-- sequence start
CREATE sequence T_APP_STRATEGY_LABEL_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_FENCE_TRIGGER_LOG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_FENCE_INOUT_LOG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_SYSEVENT_LOG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_LABEL_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_TIME_UNIT_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_DIAGNOSE_LOG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;


create sequence T_EXCEPTION_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_LDAP_CONFIG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_CONNECTOR_ID_SEQ
minvalue 1
maxvalue 99999999999999999999
increment by 1
cache 20;

create sequence T_VIRUSSCAN_LATEST_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_VIRUSSCAN_HISTORY_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_MALWARE_LIST_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;


create sequence T_API_TOKEN_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;


create sequence T_APP_PUSH_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_APP_CATEGORY_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_APP_DOWNLOAD_LOG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_APP_STORE_CATEGORY_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_APP_STORE_DEVICE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_APP_STORE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_APP_STRATEGY_DEVICE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_APP_STRATEGY_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_APP_STRATEGY_IRRE_LOG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_APP_STRATEGY_STORE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_APP_STRATEGY_USER_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence t_app_strategy_group_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_APP_TIME_GROUP_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_COMPLIANCE_SCHEDULE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_CONTACT_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_CONTACT_LOG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_CONTACT_VERSION_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_APN_TOKEN_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_APP_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_CMD_SEND_STATE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_CHECK_DEVICE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_CHECK_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_MODEL_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_OPER_LOG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_PROFILE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_REMOTECONTROL_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_SAMSUNG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_SECURITYINFO_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_STATUS_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_TMP_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_USING_LOG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DOCUMENT_OPER_LOG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DOCUMENT_STATISTICS_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DOCUMENT_TAG_GROUP_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DOCUMENT_TAG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DOCUMENT_TAG_USER_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DOCUMENT_USER_VERSION_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DOC_GROUP_VERSION_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence t_file_dist_group_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_FILE_DISTRIBUTE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence t_file_dist_user_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_FILE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_FILE_USER_OPEN_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_FILE_USER_STAR_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_FOLDER_DISTRIBUTE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_FOLDER_DIST_GROUP_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_FOLDER_DIST_USER_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_FOLDER_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_GROUP_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_IMPORT_SERVER_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_MEM_TASK_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_PERM_TEMPLATE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_PERM_TEMPLATE_MENU_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_POLICY_GROUP_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_POLICY_USER_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_RESET_PASSWORD_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_SYS_LOG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_SYS_ROLE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_SYS_ROLE_MENU_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_SYS_USER_GROUP_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_SYS_USER_PERM_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_SYS_USER_ROLE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_TAG_GROUP_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_TAG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_TAG_POSITION_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_TAG_TIME_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_TAG_USER_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_TEMP_DEVICE_IOS_CTRL_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_USER_CENTER_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_USER_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_VERSION_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_VIOLATION_ADMIN_ALARM_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_VIOLATION_DEVICE_APP_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_VIOLATION_DEVICE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_VIOLATION_DEVICE_PROC_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_VIOLATION_DIST_DEVICE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_REMOTE_DESKTOP_LOG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_USER_SIGNIN_LOG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_APP_STORE_CONF_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_APP_STRATEGY_PUSH_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_VIOLATIONS_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_VIOLATIONS_GROUP_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_VIOLATIONS_USER_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_VIOLATE_DIST_DEVICE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_STATIC_LABEL_USER_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DYNAMIC_LABEL_USER_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_EMM_CLIENT_LOGIN_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

CREATE SEQUENCE hibernate_sequence
MINVALUE 1
MAXVALUE 999999999999999999999999
START WITH 1000000
INCREMENT BY 1
CACHE 20;

create sequence T_USER_PIN_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_USER_APP_PERMISSION_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_INDEX_SHORTCUT_DEF_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_INDEX_CHART_DEF_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_INDEX_SHORTCUT_SET_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_INDEX_CHART_SET_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_INDEX_STRATEGY_SET_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_INDEX_APP_SET_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_INDEX_APP_MAX_SET_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_IND_STRATEGY_MAX_SET_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_USER_BACK_THREAD_LOG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_POLICY_PUSH_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

CREATE SEQUENCE T_DEVICE_MSG_ID_SEQ
MINVALUE 1
MAXVALUE 999999999999999999999999
START WITH 1000000
INCREMENT BY 1
CACHE 20;

CREATE SEQUENCE T_APP_TRAFFIC_ID_SEQ
MINVALUE 1
MAXVALUE 999999999999999999999999
START WITH 1000000
INCREMENT BY 1
CACHE 20;

CREATE SEQUENCE T_DEVICE_TRAFFIC_ID_SEQ
MINVALUE 1
MAXVALUE 999999999999999999999999
START WITH 1000000
INCREMENT BY 1
CACHE 20;

CREATE SEQUENCE T_DEVICE_CALL_ID_SEQ
MINVALUE 1
MAXVALUE 999999999999999999999999
START WITH 1000000
INCREMENT BY 1
CACHE 20;

CREATE SEQUENCE T_REPORT_CHATS_CONTENT_ID_SEQ
MINVALUE 1
MAXVALUE 999999999999999999999999
START WITH 1000000
INCREMENT BY 1
CACHE 20;

CREATE SEQUENCE T_REPORT_CHATS_FILE_ID_SEQ
MINVALUE 1
MAXVALUE 999999999999999999999999
START WITH 1000000
INCREMENT BY 1
CACHE 20;

CREATE SEQUENCE T_DEVICE_BROWSERHISTORY_ID_SEQ
MINVALUE 1
MAXVALUE 999999999999999999999999
START WITH 1000000
INCREMENT BY 1
CACHE 20;

CREATE SEQUENCE T_SYS_DICTIONARY_ID_SEQ
MINVALUE 1
MAXVALUE 999999999999999999999999
START WITH 1000000
INCREMENT BY 1
CACHE 20;

CREATE SEQUENCE T_SYS_DICTIONARY_VALUE_ID_SEQ
MINVALUE 1
MAXVALUE 999999999999999999999999
START WITH 1000000
INCREMENT BY 1
CACHE 20;

CREATE SEQUENCE T_IOS_BUILDIN_APP_ID_SEQ
MINVALUE 1
MAXVALUE 999999999999999999999999
START WITH 1000000
INCREMENT BY 1
CACHE 20;

CREATE SEQUENCE T_USER_CUSTOM_FIELD_ID_SEQ
MINVALUE 1
MAXVALUE 999999999999999999999999
START WITH 1000000
INCREMENT BY 1
CACHE 20;

CREATE SEQUENCE T_TIME_FENCE_RECORD_ID_SEQ
MINVALUE 1
MAXVALUE 999999999999999999999999
START WITH 1000000
INCREMENT BY 1
CACHE 20;

create sequence T_PERM_TEMPLATE_API_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_SYS_USER_API_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_APN_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_CERT_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_CRYPTOMODULE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_ACCESSWEB_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_HISTORY_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_CALLOVER_LOG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_APPUSAGE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_USERCHECKIN_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_APP_ACTION_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_COMMAND_LOG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_APP_STORE_APPINFO_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_APPLE_DEP_DEVICE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_APPLE_DEP_PROFILE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_APPLE_DEVICE_PROFILE_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_DEVICE_NETWORK_LOG_ID_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1000000
increment by 1
cache 20;

create sequence T_USER_FAMILY_PHONE_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

create sequence T_ENTRANCE_GUARD_GROUP_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

create sequence T_ENTRANCE_GUARD_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

create sequence T_ENTRANCE_GUARD_PUSH_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

create sequence T_ENTRANCE_GUARD_PU_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

create sequence T_ENTRANCE_GUARD_PUG_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

create sequence T_ENTRANCE_GUARD_DEVICE_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

create sequence T_ENTRANCE_GUARD_LOG_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

create sequence T_DEVICE_WECHAT_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

create sequence T_DEVICE_WECHAT_LINKMAN_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

create sequence T_DEVICE_WECHAT_LOG_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

create sequence T_ILLEGAL_TIME_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

create sequence T_ACCESSWEB_RESTRICTION_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

create sequence T_LOCATION_HISTORY_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

create sequence T_LAST_LOCATION_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

create sequence T_DEVICE_COLLECT_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

CREATE sequence T_ILLEGAL_SMSSEND_LOG_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

CREATE sequence T_GOOGLE_PLAY_PRODUCT_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

create sequence T_GOOGLE_LAYOUT_PAGE_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

create sequence T_GOOGLE_USER_PRODUCT_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

CREATE sequence T_CLIENT_LAYOUT_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  increment by 1
  cache 20;

CREATE sequence T_DEVICE_AREA_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  increment by 1
  cache 20;

CREATE sequence T_DEVICE_APP_STARTUP_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  increment by 1
  cache 20;

CREATE sequence T_DEVICE_APP_CRASH_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  increment by 1
  cache 20;

CREATE sequence T_CLIENT_LAYOUT_GROUP_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  increment by 1
  cache 20;

CREATE sequence T_STATIC_LABEL_DEVICE_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  increment by 1
  cache 20;

CREATE sequence T_LABEL_DEVICE_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  increment by 1
  cache 20;

CREATE sequence T_POLICY_DEVICE_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  increment by 1
  cache 20;

CREATE sequence T_FILE_DIST_DEVICE_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  increment by 1
  cache 20;

CREATE sequence T_APP_PUSH_DEVICE_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  increment by 1
  cache 20;

CREATE sequence T_CERTIFICATE_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  increment by 1
  cache 20;

CREATE sequence T_USER_VACATION_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  increment by 1
  cache 20;

CREATE sequence T_WECHAT_LINKMAN_HIS_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

CREATE sequence T_PUSH_INFO_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

CREATE sequence T_VPP_APP_CDKEY_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

CREATE sequence T_VPP_DEVICE_APP_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

CREATE sequence T_VPP_STORE_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

CREATE sequence T_VPP_USER_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;

CREATE sequence T_VPP_USER_STORE_ID_SEQ
  minvalue 1
  maxvalue 999999999999999999999999
  start with 1000000
  increment by 1
  cache 20;
-- sequence end
-- table start
CREATE TABLE "T_VIRUSSCAN_LATEST"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "TOTALCOUNT" INT NOT NULL,
 "MALWARECOUNT" INT NOT NULL,
 "SCANSTATUS" INT NOT NULL,
 "SCANTIME" TIMESTAMP(0) NULL,
 "SCANID" BIGINT NOT NULL,
 "CREATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_VIRUSSCAN_HISTORY"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "TOTALCOUNT" INT NOT NULL,
 "MALWARECOUNT" INT NOT NULL,
 "SCANSTATUS" INT NOT NULL,
 "SCANTIME" TIMESTAMP(0) NULL,
 "CREATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_VIOLATION_DEVICE_PROC"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "UUID" VARCHAR(50) NOT NULL,
 "VIOLATIONID" BIGINT NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "PROCSTRATEGYID" BIGINT NULL,
 "PROCESSID" INT NOT NULL,
 "PROCESSTIME" TIMESTAMP(0) NULL,
 "PROCESSSTATUS" INT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_VIOLATION_DEVICE_APP"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "VIOLATIONID" BIGINT NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "APPSTRATEGYID" BIGINT NULL,
 "PACKAGENAME" VARCHAR(200) NOT NULL,
 "APPVERSION" VARCHAR(50) NULL
);
CREATE TABLE "T_VIOLATION_DEVICE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "VIOLATIONID" BIGINT NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "CONDID" INT NOT NULL,
 "VIOLATIONTYPE" INT NOT NULL,
 "CONDTITLE" VARCHAR(200) NOT NULL,
 "APPSTRATEGYID" BIGINT NULL,
 "POLICYID" VARCHAR(100) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "ADMINALARMIDS" VARCHAR(500) NULL
);
CREATE TABLE "T_VIOLATION_COND_DICT"
(
 "CONDID" INT NOT NULL,
 "VIOLATIONTYPE" INT NOT NULL,
 "TITLE" VARCHAR(200) NOT NULL
);
CREATE TABLE "T_VIOLATION_ADMIN_ALARM"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "ALARMNAME" VARCHAR(200) NOT NULL,
 "REPORTCYCLE" INT NOT NULL,
 "EMAIL" VARCHAR(1000) NULL,
 "PHONE" VARCHAR(1000) NULL,
 "LANGUAGE" VARCHAR(10) DEFAULT 'zh_CN'
 NOT NULL,
 "OWNERID" VARCHAR(50) NOT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_VIOLATIONS_USER"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "VIOLATIONID" BIGINT NOT NULL,
 "USERID" BIGINT NOT NULL,
 "RELATIONSHIPS" VARCHAR(500) NOT NULL,
 "APPTYPE" VARCHAR(50) NULL
);
CREATE TABLE "T_VIOLATIONS_GROUP"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "VIOLATIONID" BIGINT NOT NULL,
 "GROUPID" BIGINT NOT NULL,
 "RELATIONSHIPS" VARCHAR(500) NOT NULL,
 "APPTYPE" VARCHAR(50) NULL
);
CREATE TABLE "T_VIOLATIONS_DEVICE_COPY"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "VIOLATIONID" BIGINT NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "RELATIONSHIPS" VARCHAR(500) NOT NULL
);
CREATE TABLE "T_VIOLATIONS_DEVICE"
(
 "ID" BIGINT IDENTITY(4,1) NOT NULL,
 "VIOLATIONID" BIGINT NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "RELATIONSHIPS" VARCHAR(500) NOT NULL
);
CREATE TABLE "T_VIOLATIONS"
(
 "ID" BIGINT IDENTITY(3,1) NOT NULL,
 "VIOLATIONNAME" VARCHAR(200) NOT NULL,
 "CONDID" INT NOT NULL,
 "VIOLATIONTYPE" INT NOT NULL,
 "CONDVALUE" VARCHAR(200) NULL,
 "PLATFORMTYPES" VARCHAR(30) DEFAULT '1,2,3,4'
 NOT NULL,
 "RELATIONSHIP" VARCHAR(50) DEFAULT '1,2,3'
 NULL,
 "USERALARMWAYS" VARCHAR(50) NULL,
 "ALARMID" VARCHAR(500) NULL,
 "PROCESSID" INT NOT NULL,
 "GRACEPERIOD" INT NULL,
 "STATUS" INT DEFAULT 0
 NULL,
 "CREATEBY" VARCHAR(50) NOT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "LOCKPASS" VARCHAR(20) NULL,
 "GENTYPE" INT NULL,
 "APPPKGLIST" VARCHAR(2000) NULL,
 "OLDAPPPKGLIST" VARCHAR(2000) NULL
);
CREATE TABLE "T_VIOLATE_PROCESS_DICT"
(
 "PROCESSID" INT NOT NULL,
 "TITLE" VARCHAR(200) NOT NULL
);
CREATE TABLE "T_VIOLATE_DIST_DEVICE"
(
 "ID" BIGINT IDENTITY(4,1) NOT NULL,
 "VIOLATIONID" BIGINT NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "CONDID" INT NOT NULL,
 "CONDVALUE" VARCHAR(200) NULL,
 "USERALARMWAYS" VARCHAR(50) NULL,
 "ADMINALARMIDS" VARCHAR(500) NULL,
 "VIOLATIONPROCESS" VARCHAR(500) NOT NULL,
 "STATUS" INT DEFAULT 0
 NOT NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL
);
CREATE TABLE "T_VERSION"
(
 "ID" INT IDENTITY(1,1) NOT NULL,
 "PKGNAME" VARCHAR(200) NOT NULL,
 "NAME" VARCHAR(200) NOT NULL,
 "VERSION" VARCHAR(50) NOT NULL,
 "PKGSIZE" VARCHAR(20) DEFAULT '0'
 NOT NULL,
 "OSTYPE" INT DEFAULT 1
 NOT NULL,
 "APPTYPE" INT DEFAULT 0
 NOT NULL,
 "DOWNLOADTYPE" INT DEFAULT 1
 NOT NULL,
 "SOURCE" VARCHAR(200) NOT NULL,
 "STOREURL" VARCHAR(200) NULL,
 "RELEASENOTE" VARCHAR(2000) NOT NULL,
 "RELEASETIME" TIMESTAMP(0) NOT NULL,
 "DELSIGN" INT DEFAULT 0
 NOT NULL
);
CREATE TABLE "T_USER_SIGNIN_LOG"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "USERID" BIGINT NOT NULL,
 "FAILEDATTEMPTTIMES" INT DEFAULT 0
 NULL,
 "LASTFAILEDTIME" TIMESTAMP(0) NULL,
 "LOCKSTATUS" INT DEFAULT 0
 NULL,
 "LOCKEXPIRETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_USER_PIN"
(
 "ID" BIGINT NOT NULL,
 "PINCODE" VARCHAR(45) NOT NULL,
 "PINEXPIREDATE" TIMESTAMP(0) NOT NULL,
 "PINCODESENDSTATUS" INT DEFAULT 0
 NOT NULL,
 "GENTYPE" INT DEFAULT 0
 NULL,
 "SYNSTATUS" INT DEFAULT 1
 NULL
);
CREATE TABLE "T_USER_FAMILY_PHONE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "USERID" BIGINT NOT NULL,
 "NAME" VARCHAR(50) NOT NULL,
 "PHONE" VARCHAR(20) NOT NULL,
 "REMARK" VARCHAR(255) NULL,
 "TYPE" INT DEFAULT 1
 NOT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_USER_CUSTOM_FIELD"
(
 "ID" BIGINT NOT NULL,
 "FIELD" VARCHAR(100) NOT NULL,
 "NAME" VARCHAR(200) DEFAULT ''
 NULL
);
CREATE TABLE "T_USER_CENTER"
(
 "ID" BIGINT IDENTITY(2304,1) NOT NULL,
 "OPERTYPE" INT NOT NULL,
 "LOGINID" VARCHAR(50) NULL,
 "PASSWORD" VARCHAR(50) NULL,
 "NAME" VARCHAR(50) NULL,
 "MAIL" VARCHAR(200) NULL,
 "MOBILE" VARCHAR(50) NULL,
 "LDAPGROUP" VARCHAR(200) NULL,
 "DEVICETYPE" INT NULL,
 "MODEL" VARCHAR(100) NULL,
 "RELATIONSHIP" INT NULL,
 "DEVICENUMBER" VARCHAR(50) NULL,
 "SERIALNUM" VARCHAR(50) NULL,
 "IMEI" VARCHAR(50) NULL,
 "WIFIMAC" VARCHAR(30) NULL,
 "VERSIONNUMBER" VARCHAR(100) NULL,
 "TYPE" INT NOT NULL,
 "CONFLICT" INT NOT NULL,
 "DEVICENAME" VARCHAR(100) NULL,
 "DEVICEPLATFORM" INT NULL,
 "DISPLAYGROUP" VARCHAR(200) NULL,
 "SIM" VARCHAR(200) NULL,
 "PASSWORD1" VARCHAR(50) NULL,
 "PRODUCTTYPE" VARCHAR(100) NULL,
 "IMSI" VARCHAR(50) NULL,
 "SDSERIALNUM" VARCHAR(100) NULL,
 "CUSTOM1" VARCHAR(255) NULL,
 "CUSTOM2" VARCHAR(255) NULL,
 "CUSTOM3" VARCHAR(255) NULL,
 "CUSTOM4" VARCHAR(255) NULL,
 "CUSTOM5" VARCHAR(255) NULL,
 "PINCODE" VARCHAR(45) NULL,
 "PWDTYPE" INT DEFAULT 1
 NULL,
 "PLAINPASSWORD" VARCHAR(50) DEFAULT ''
 NULL,
 "APPTYPE" VARCHAR(10) NULL,
 "SUBGROUPID" BIGINT NULL,
 "SUBGROUPNAME" VARCHAR(100) NULL
);
CREATE TABLE "T_USER_BACK_THREAD_LOG"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "TYPE" INT NULL,
 "RESULT" INT NULL,
 "DESTID" BIGINT NULL,
 "OLDPARENTID" BIGINT NULL,
 "NEWPARENTID" BIGINT NULL,
 "POLICYRESULT" VARCHAR(10) NULL,
 "APPRESULT" VARCHAR(10) NULL,
 "VIOLATIONRESULT" VARCHAR(10) NULL,
 "DEVICERESULT" VARCHAR(10) NULL,
 "MCMRESULT" VARCHAR(10) NULL,
 "WHITEBLACKRESULT" VARCHAR(10) NULL,
 "PERMISSIONRESULT" VARCHAR(10) NULL,
 "LABELRESULT" VARCHAR(10) NULL,
 "REPORTRESULT" VARCHAR(10) NULL,
 "LOGINID" VARCHAR(50) NULL,
 "STARTTIME" TIMESTAMP(0) NULL,
 "ENDTIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_USER_APP_PERMISSION"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "PKGNAME" VARCHAR(200) NOT NULL,
 "APP_USERNAME" VARCHAR(200) NOT NULL,
 "USERID" BIGINT NOT NULL,
 "PERMISSION" INT NULL,
 "USER_APP_EXTRA_ID" BIGINT NULL,
 "RESERVED_STRING" VARCHAR(200) NULL,
 "RESERVED_STRING2" VARCHAR(200) NULL,
 "RESERVED_LONG" BIGINT NULL
);
CREATE TABLE "T_USER"
(
 "ID" BIGINT IDENTITY(46003,1) NOT NULL,
 "LOGINID" VARCHAR(50) NOT NULL,
 "PASSWORD" VARCHAR(50) DEFAULT ''
 NULL,
 "NAME" VARCHAR(150) NOT NULL,
 "MAIL" VARCHAR(200) DEFAULT 'default@default.com'
 NULL,
 "MOBILE" VARCHAR(50) NULL,
 "TYPE" INT NOT NULL,
 "CANLOGINSELF" INT DEFAULT 1
 NOT NULL,
 "CANREGISTDEVICE" INT DEFAULT 1
 NOT NULL,
 "CANELIMINATEDEVICE" INT DEFAULT 1
 NOT NULL,
 "ALLOWACTIVATENUM" INT DEFAULT 1
 NOT NULL,
 "AUTOSYNCONTACTSFLAG" INT DEFAULT 1
 NULL,
 "CONFLICT" INT DEFAULT 0
 NOT NULL,
 "STATUS" INT DEFAULT 1
 NOT NULL,
 "CREATTIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "ALLOWUNREGISTEREDACTIVATE" INT DEFAULT 1
 NULL,
 "ALLOWINCONSISTENTACTIVATE" INT DEFAULT 1
 NULL,
 "GUID" VARCHAR(100) NULL,
 "SYNCBACTCHNO" BIGINT DEFAULT 0
 NULL,
 "GROUPID" BIGINT NULL,
 "FORCEMODIFYPWD" INT DEFAULT 1
 NULL,
 "MAXPWDAGE" INT DEFAULT 0
 NULL,
 "MAXFAILEDATTEMPTS" INT DEFAULT 0
 NULL,
 "PWDSTARTTIME" TIMESTAMP(0) NULL,
 "LOCKINTERVAL" INT DEFAULT 0
 NULL,
 "BEMAIL" VARCHAR(200) NULL,
 "PWDMODIFIED" INT DEFAULT 0
 NULL,
 "BMPERMISSION" INT DEFAULT (-1)
 NOT NULL,
 "LDAPCONFIGID" BIGINT NULL,
 "EMMLOGINAGAIN" INT DEFAULT 0
 NULL,
 "RESETPWD" INT DEFAULT 1
 NULL,
 "NEEDLOCKPASSWD" INT DEFAULT 1
 NULL,
 "FORBIDUNLOAD" INT DEFAULT 1
 NULL,
 "PASSWORDSTRENGTH" INT DEFAULT 2
 NULL,
 "CUSTOM1" VARCHAR(255) NULL,
 "CUSTOM2" VARCHAR(255) NULL,
 "CUSTOM3" VARCHAR(255) NULL,
 "CUSTOM4" VARCHAR(255) NULL,
 "CUSTOM5" VARCHAR(255) NULL,
 "LOCKOPER" INT DEFAULT 1
 NULL,
 "ALLOWACTIVATE" INT DEFAULT 1
 NOT NULL,
 "PLAINPASSWORD" VARCHAR(50) DEFAULT ''
 NULL,
 "ALLOWLOGOUT" INT DEFAULT 1
 NULL,
 "SYNCFLAG" INT DEFAULT 0
 NULL,
 "IDENTIFIER" VARCHAR(50) NULL,
 "POLICETYPE" VARCHAR(50) NULL,
 "OID" VARCHAR(50) NULL,
 "AVATAR" VARCHAR(100) NULL,
 "LOCATIONSTATUS" INT DEFAULT 1
 NOT NULL,
 "GOOGLEUSERID" VARCHAR(32) NULL,
 "GOOGLEUSERKIND" VARCHAR(32) NULL,
 "GOOGLEUSERMANAGETYPE" VARCHAR(32) NULL,
 "GOOGLEUSERACCOUNTTYPE" VARCHAR(32) NULL,
 "GOOGLEUSERMAIL" VARCHAR(200) NULL,
 "GOOGLEUSERIDENTIFIER" VARCHAR(100) NULL,
 "GOOGLEUSERNAME" VARCHAR(100) NULL,
 "GOOGLEUSERTYPE" INT DEFAULT 0
 NOT NULL,
 "GOOGLEDEVICETYPE" INT DEFAULT 0
 NOT NULL,
 "SYNCCONNECTORID" BIGINT NULL
);
CREATE TABLE "T_TIME_UNIT"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "FENCEID" BIGINT NOT NULL,
 "TYPE" INT NOT NULL,
 "VALUE" VARCHAR(50) NULL,
 "BEGINTIME" VARCHAR(5) NOT NULL,
 "ENDTIME" VARCHAR(5) NOT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_TIME_FENCE_RECORD"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "UDID" VARCHAR(50) DEFAULT ''
 NOT NULL,
 "POLICYID" VARCHAR(50) DEFAULT ''
 NOT NULL,
 "STATUS" INT DEFAULT 2
 NOT NULL,
 "CREATE_TIME" TIMESTAMP(0) NOT NULL,
 "SENDCMD" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_TEMP_DEVICE_IOS_CTRL"
(
 "ID" BIGINT IDENTITY(22,1) NOT NULL,
 "UDID" VARCHAR(50) NULL,
 "UUID" VARCHAR(100) NULL,
 "OPERTYPE" INT NOT NULL,
 "PARAMCONTENT" VARCHAR(500) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "RETRYTIME" TIMESTAMP(0) NULL,
 "RETRYTIMES" INT NULL,
 "STATUS" INT NULL
);
CREATE TABLE "T_TAG_USER"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "TAGID" BIGINT NULL,
 "USERID" BIGINT NULL,
 "CUSTOMFLAG" INT DEFAULT 0
 NULL,
 "EXCEPTIONFLAG" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_TAG_TIME"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "TAGID" BIGINT NULL,
 "MINDATETIME" TIMESTAMP(0) NULL,
 "MAXDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_TAG_POSITION"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "TAGID" BIGINT NULL,
 "MINLONGITUDE" DOUBLE NULL,
 "MINLATITUDE" DOUBLE NULL,
 "MAXLONGITUDE" DOUBLE NULL,
 "MAXLATITUDE" DOUBLE NULL
);
CREATE TABLE "T_TAG_GROUP"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "TAGID" BIGINT NULL,
 "GROUPID" BIGINT NULL,
 "CUSTOMFLAG" INT DEFAULT 0
 NULL,
 "EXCEPTIONFLAG" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_TAG"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "TAGNAME" VARCHAR(100) NULL,
 "TAGTYPE" INT NOT NULL,
 "STATUS" INT NULL,
 "DESCRIPTION" VARCHAR(500) NULL,
 "ISDEFAULT" INT NULL,
 "ISALLUSER" INT NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "UPDATETIME" TIMESTAMP(0) NOT NULL,
 "CREATEBY" VARCHAR(100) NULL,
 "UPDATEBY" VARCHAR(100) NULL
);
CREATE TABLE "T_SYS_USER_ROLE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "LOGINID" VARCHAR(50) NOT NULL,
 "ROLEID" BIGINT NOT NULL
);
CREATE TABLE "T_SYS_USER_PERM"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "LOGINID" VARCHAR(50) NOT NULL,
 "CODE" VARCHAR(50) NOT NULL,
 "AUTHORITY" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_SYS_USER_GROUP"
(
 "ID" BIGINT IDENTITY(4082,1) NOT NULL,
 "LOGINID" VARCHAR(50) NOT NULL,
 "GROUPID" BIGINT NOT NULL
);
CREATE TABLE "T_SYS_USER_API"
(
 "ID" BIGINT IDENTITY(216806,1) NOT NULL,
 "LOGINID" VARCHAR(50) NOT NULL,
 "APICODE" VARCHAR(50) NULL,
 "FUNCCODE" VARCHAR(50) NULL
);
CREATE TABLE "T_SYS_USER"
(
 "LOGINID" VARCHAR(50) NOT NULL,
 "PASSWORD" VARCHAR(50) DEFAULT ''
 NULL,
 "NAME" VARCHAR(50) NOT NULL,
 "TELEPHONE" VARCHAR(20) NULL,
 "EMAIL" VARCHAR(50) NULL,
 "DESCRIPTION" VARCHAR(200) NULL,
 "FLAG" INT NULL,
 "PARENTID" VARCHAR(50) NULL,
 "NEEDCHANGEPWD" INT DEFAULT 0
 NULL,
 "SYNCCONNECTORID" BIGINT NULL,
 "SYNCBATCHNO" BIGINT NULL,
 "SYNCUID" VARCHAR(100) NULL,
 "ROLES" VARCHAR(100) NULL
);
CREATE TABLE "T_SYS_ROLE_MENU"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "ROLEID" BIGINT NOT NULL,
 "CODE" VARCHAR(50) NOT NULL,
 "AUTHORITY" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_SYS_ROLE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "NAME" VARCHAR(100) NOT NULL,
 "DESCRIPTION" VARCHAR(200) NULL,
 "SYSFLAG" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_SYS_MENU"
(
 "CODE" VARCHAR(50) NOT NULL,
 "PARENTCODE" VARCHAR(50) NULL,
 "TYPE" INT NULL,
 "MENULEVEL" INT NULL,
 "TITLE" VARCHAR(100) NULL,
 "ROOTPATH" VARCHAR(100) NULL,
 "URL" VARCHAR(250) DEFAULT ''
 NULL,
 "TEMPLATEFLAG" BIGINT NULL
);
CREATE TABLE "T_SYS_LOG"
(
 "ID" BIGINT  NOT NULL,
 "USERID" BIGINT NULL,
 "LOGINID" VARCHAR(50) NULL,
 "NAME" VARCHAR(50) NULL,
 "IP" VARCHAR(20) NULL,
 "CATEGORY" INT NULL,
 "OPERTYPE" VARCHAR(100) NULL,
 "OPERTIME" TIMESTAMP(0) NULL,
 "OPERDESC" VARCHAR(500) NULL,
 "OPTLEVEL" VARCHAR(50) NULL,
 "OPTAFFECTED" CLOB NULL,
 "OPTCONTENT" VARCHAR(1000) NULL,
 "OPTIDS" CLOB NULL
);
CREATE TABLE "T_SYS_DICTIONARY_VALUE"
(
 "ID" BIGINT IDENTITY(116,1) NOT NULL,
 "DICTKEY" VARCHAR(50) NOT NULL,
 "DICTVALUE" VARCHAR(50) NOT NULL,
 "STATUS" INT NOT NULL,
 "DICTTYPE" BIGINT NOT NULL,
 "FROMTYPE" INT NOT NULL,
 "CREATOR" VARCHAR(50) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATER" VARCHAR(50) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "PWDSEND" INT DEFAULT 1
 NOT NULL
);
CREATE TABLE "T_SYS_DICTIONARY"
(
 "ID" BIGINT IDENTITY(10,1) NOT NULL,
 "DICTNAME" VARCHAR(50) NOT NULL,
 "DESCRIPTION" VARCHAR(255) NOT NULL
);
CREATE TABLE "T_SYS_CONFIG"
(
 "ID" VARCHAR(64) NOT NULL,
 "PROP_KEY" VARCHAR(256) NULL,
 "PROP_VALUE" VARCHAR(2048) NULL,
 "NOTE" VARCHAR(1024) NULL,
 "CONFIG_FILE_NAME" VARCHAR(128) NULL
);
CREATE TABLE "T_SYSCONF_SETLICENSE"
(
 "ID" VARCHAR(100) NOT NULL,
 "ISSUEDATE" VARCHAR(100) NULL,
 "EXPIREDATE" VARCHAR(100) NULL,
 "LICENSEVALUE" VARCHAR(256) NULL,
 "MAXUSERCOUNTS" VARCHAR(16) NULL,
 "USEDCOUNTS" VARCHAR(16) NULL,
 "LICENSETYPE" TINYINT DEFAULT 0
 NULL,
 "USERID" VARCHAR(100) NULL,
 "GROUPID" VARCHAR(100) NULL
);
CREATE TABLE "T_STATIC_LABEL_USER"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "LABELID" BIGINT NOT NULL,
 "USERID" BIGINT NOT NULL
);
CREATE TABLE "T_SERVER"
(
 "ID" VARCHAR(100) NOT NULL,
 "NAME" VARCHAR(100) NOT NULL,
 "VERSION" VARCHAR(30) NOT NULL,
 "TYPE" VARCHAR(20) NOT NULL,
 "URL" VARCHAR(200) NULL,
 "AUTHTOKEN" VARCHAR(500) NULL,
 "BCAUTHTOKEN" VARCHAR(500) NULL,
 "LASTCHECKTIMESTAMP" BIGINT NULL,
 "CREATEDDATETIME" TIMESTAMP(0) NOT NULL,
 "UPDATEDDATETIME" TIMESTAMP(0) NOT NULL
);
CREATE TABLE "T_RESTRICTIONS_SAMSUNG"
(
 "ID" VARCHAR(100) NOT NULL,
 "UUID" VARCHAR(100) NOT NULL,
 "ALLOWAPPFROMWHITELISTUNINSTALL" TINYINT DEFAULT 0
 NULL,
 "ALLOWBLUETOOTH" TINYINT DEFAULT 0
 NULL,
 "ALLOWCAMERA" TINYINT DEFAULT 0
 NULL,
 "ALLOWMICROPHONE" TINYINT DEFAULT 0
 NULL,
 "ALLOWWIFI" TINYINT DEFAULT 0
 NULL,
 "ALLOWNFC" TINYINT DEFAULT 0
 NULL,
 "ALLOWMOCKLOCATION" TINYINT DEFAULT 0
 NULL,
 "ALLOWSDCARD" TINYINT DEFAULT 0
 NULL,
 "ALLOWUSB" TINYINT DEFAULT 0
 NULL,
 "ALLOWVPN" TINYINT DEFAULT 0
 NULL,
 "ALLOWOTAUPGRADE" TINYINT DEFAULT 0
 NULL,
 "ALLOW3GDATA" TINYINT DEFAULT 0
 NULL,
 "ALLOWSETTINGSCHANGES" TINYINT DEFAULT 0
 NULL,
 "ALLOWBROWSER" TINYINT DEFAULT 0
 NULL,
 "ALLOWROAMINGVOICECALLS" TINYINT DEFAULT 0
 NULL,
 "ALLOWROAMINGDATA" TINYINT DEFAULT 0
 NULL,
 "ALLOWROAMINGMSG" TINYINT DEFAULT 0
 NULL
);
CREATE TABLE "T_RESET_PASSWORD"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "USERID" VARCHAR(100) NOT NULL,
 "TOKEN" VARCHAR(200) NOT NULL,
 "STATUS" INT NOT NULL,
 "CREATTIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_REPORT_SUBS_PARAM"
(
 "ID" VARCHAR(50) NOT NULL,
 "SUBSID" VARCHAR(50) NOT NULL,
 "REPORTID" VARCHAR(50) NOT NULL,
 "PARAMNAME" VARCHAR(100) NOT NULL,
 "PARAMVALUE" VARCHAR(500) NOT NULL
);
CREATE TABLE "T_REPORT_SUBSCRIPTION"
(
 "ID" VARCHAR(50) NOT NULL,
 "REPORTID" VARCHAR(50) NOT NULL,
 "CREATER" VARCHAR(50) NOT NULL,
 "SUBSNAME" VARCHAR(200) NOT NULL,
 "REPORTDOCTYPE" INT NOT NULL,
 "INCOMINGMAIL" VARCHAR(200) NOT NULL,
 "CYCLETYPE" INT NOT NULL,
 "REPORTCYCLE" INT DEFAULT 0
 NULL,
 "SUBSTIME" VARCHAR(100) NOT NULL,
 "DESCRIPTION" VARCHAR(200) NULL,
 "LASTEXETIME" TIMESTAMP(0) NULL,
 "LASTEXESTATUS" INT NULL,
 "FILEPATH" VARCHAR(300) NULL
);
CREATE TABLE "T_REPORT_SCHEDULE"
(
 "ID" VARCHAR(50) NOT NULL,
 "SUBSID" VARCHAR(50) NOT NULL,
 "REPORTID" VARCHAR(50) NOT NULL,
 "JOBNAME" VARCHAR(100) NOT NULL,
 "JOBGROUP" VARCHAR(100) NOT NULL,
 "TRIGGERNAME" VARCHAR(100) NOT NULL,
 "TRIGGERGROUP" VARCHAR(100) NOT NULL,
 "CRONEXPRESSION" VARCHAR(200) NOT NULL
);
CREATE TABLE "T_REPORT_CHATS_FILE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DEVICEID" VARCHAR(50) NOT NULL,
 "USERID" BIGINT NOT NULL,
 "APPID" BIGINT NULL,
 "APPPKG" VARCHAR(200) NULL,
 "APPNAME" VARCHAR(200) NULL,
 "CHATSTYPE" VARCHAR(255) NULL,
 "FILEPATH" VARCHAR(255) NOT NULL,
 "ORIGINFILENAME" VARCHAR(255) NOT NULL,
 "FILETYPE" VARCHAR(255) NOT NULL,
 "FILESIZE" VARCHAR(255) NOT NULL,
 "COLLECTIONTIME" TIMESTAMP(0) NULL,
 "REPORTTIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "AUDITTYPE" INT DEFAULT 1
 NULL,
 "ACCOUNT" VARCHAR(100) NULL,
 "VERSION" VARCHAR(50) NULL
);
CREATE TABLE "T_REPORT_CHATS_CONTENT"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DEVICEID" VARCHAR(50) NOT NULL,
 "USERID" BIGINT NOT NULL,
 "APPID" BIGINT NULL,
 "APPPKG" VARCHAR(2000) NOT NULL,
 "APPNAME" VARCHAR(200) NOT NULL,
 "MSGTYPE" INT NULL,
 "CONTACTS" VARCHAR(255) NULL,
 "KEYWORD" VARCHAR(255) NULL,
 "CHATCONTENT" VARCHAR(13000) NULL,
 "OCCURREDTIME" TIMESTAMP(0) NULL,
 "COLLECTIONTIME" TIMESTAMP(0) NULL,
 "REPORTTIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "CONTENTTYPE" INT DEFAULT 1
 NULL,
 "UPDATESTATUS" INT DEFAULT 0
 NOT NULL,
 "POLICYID" VARCHAR(100) NULL
);
CREATE TABLE "T_REPORT"
(
 "ID" VARCHAR(50) NOT NULL,
 "REPORTNAME" VARCHAR(200) NOT NULL,
 "REPORTTYPE" VARCHAR(50) NOT NULL,
 "DESCRIPTION" VARCHAR(200) NULL
);
CREATE TABLE "T_REMOTE_DESKTOP_LOG"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "UDID" VARCHAR(50) NULL,
 "UUID" VARCHAR(100) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "STATUS" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_PUSH_INFO"
(
 "ID" BIGINT IDENTITY(2323,1) NOT NULL,
 "UDID" VARCHAR(50) NOT NULL,
 "UUID" VARCHAR(50) NOT NULL,
 "STATUS" INT DEFAULT 0
 NULL,
 "SOURCE" INT DEFAULT 0
 NULL,
 "CONTENT" VARCHAR(512) NULL,
 "RESOURCEURI" VARCHAR(300) NULL,
 "CREATETIME" TIMESTAMP(0) DEFAULT '0001-01-01 00:00:00'
 NULL,
 "UPDATETIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
 NULL,
 "DOMAINTYPE" INT DEFAULT 0
 NULL,
 "INFOTYPE" INT DEFAULT 0
 NULL,
 "USERID" BIGINT NULL
);
CREATE TABLE "T_POLICY_USER"
(
 "ID" BIGINT IDENTITY(21,1) NOT NULL,
 "POLICYID" VARCHAR(100) NOT NULL,
 "USERID" BIGINT NOT NULL,
 "CUSTOMFLAG" INT DEFAULT 0
 NULL,
 "EXCEPTIONFLAG" INT DEFAULT 0
 NULL,
 "PUSHID" BIGINT NULL,
 "APPTYPE" VARCHAR(50) NULL
);
CREATE TABLE "T_POLICY_SCEP"
(
 "ID" VARCHAR(100) NOT NULL,
 "UUID" VARCHAR(100) NOT NULL,
 "PAYLOADIDENTIFIER" VARCHAR(200) NULL,
 "PAYLOADTYPE" VARCHAR(100) NULL,
 "URL" VARCHAR(100) NOT NULL,
 "NAME" VARCHAR(200) DEFAULT ''
 NOT NULL,
 "SUBJECT" VARCHAR(100) NOT NULL,
 "CHALLENGE" VARCHAR(100) DEFAULT ''
 NULL,
 "KEYTYPE" VARCHAR(50) NULL,
 "KEYUSAGE" INT DEFAULT 0
 NULL,
 "SUBJECTALTNAMETYPE" INT DEFAULT 0
 NULL,
 "NTPRINCIPALNAME" VARCHAR(100) NULL,
 "RFC822NAME" VARCHAR(100) NULL,
 "DNSNAME" VARCHAR(100) NULL,
 "UNIFORMRESOURCEIDENTIFIER" VARCHAR(100) NULL,
 "CAFINGERPRINT" VARCHAR(100) NULL,
 "CAFINGERPRINTSHA1" VARCHAR(100) NULL,
 "RETRIES" INT NULL,
 "RETRYDELAY" INT NULL,
 "KEYSIZE" INT NULL
);
CREATE TABLE "T_POLICY_PUSH"
(
 "ID" BIGINT IDENTITY(127,1) NOT NULL,
 "POLICYID" VARCHAR(100) NOT NULL,
 "RELATIONSHIP" VARCHAR(50) NOT NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "APPTYPE" VARCHAR(50) NULL
);
CREATE TABLE "T_POLICY_MDM"
(
 "ID" VARCHAR(100) NOT NULL,
 "UUID" VARCHAR(100) NOT NULL,
 "PAYLOADIDENTIFIER" VARCHAR(200) NULL,
 "PAYLOADTYPE" VARCHAR(100) NULL,
 "SERVERURL" VARCHAR(100) NOT NULL,
 "CHECKINURL" VARCHAR(100) NOT NULL,
 "TOPIC" VARCHAR(100) DEFAULT ''
 NOT NULL,
 "IDENTITYCERTIFICATEUUID" VARCHAR(100) NOT NULL,
 "SIGNMESSAGE" TINYINT NULL,
 "CHECKOUTWHENREMOVED" TINYINT NULL,
 "USEDEVELOPMENTAPNS" TINYINT NULL,
 "ACCESSRIGHTS" INT NULL
);
CREATE TABLE "T_POLICY_LOG"
(
 "ID" VARCHAR(50) NOT NULL,
 "PAYLOADDISPLAYNAME" VARCHAR(200) NOT NULL,
 "POLICYID" VARCHAR(50) NULL,
 "LOGINID" VARCHAR(50) NOT NULL,
 "CREATOR" VARCHAR(50) NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "STATUS" INT DEFAULT 0
 NULL,
 "TYPE" INT DEFAULT 0
 NULL,
 "EXTENSIONJSON" CLOB NULL,
 "ORIGINJSON" CLOB NULL,
 "UPDATETYPE" INT NULL
);
CREATE TABLE "T_POLICY_GROUP"
(
 "ID" BIGINT IDENTITY(67869,1) NOT NULL,
 "POLICYID" VARCHAR(100) NOT NULL,
 "GROUPID" BIGINT NOT NULL,
 "CUSTOMFLAG" INT DEFAULT 0
 NOT NULL,
 "PUSHID" BIGINT NULL,
 "APPTYPE" VARCHAR(50) NULL
);
CREATE TABLE "T_POLICY"
(
 "ID" VARCHAR(100) NOT NULL,
 "PAYLOADDISPLAYNAME" VARCHAR(200) NOT NULL,
 "PAYLOADIDENTIFIER" VARCHAR(200) NULL,
 "PAYLOADTYPE" VARCHAR(100) NULL,
 "PAYLOADORGANIZATION" VARCHAR(200) NULL,
 "PAYLOADDESCRIPTION" VARCHAR(1000) NULL,
 "PAYLOADREMOVALTYPE" INT NULL,
 "REMOVALPASSWORD" VARCHAR(50) NULL,
 "REMOVALPASSWORDPAYLOADUUID" VARCHAR(100) NULL,
 "REMOVALPASSWORDPAYLOADTYPE" VARCHAR(100) NULL,
 "REMOVALPWDPAYLOADIDENTIFIER" VARCHAR(200) NULL,
 "LOGINID" VARCHAR(50) NOT NULL,
 "CREATOR" VARCHAR(200) NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "STATUS" INT DEFAULT 0
 NULL,
 "TYPE" INT DEFAULT 0
 NULL,
 "FENCEID" BIGINT NULL,
 "PRIORITY" INT NULL,
 "PLATFORMTYPE" INT DEFAULT 1
 NOT NULL,
 "POLICYTYPE" INT DEFAULT 0
 NOT NULL,
 "MINVERSION" VARCHAR(50) NULL,
 "DEVICETYPE" INT DEFAULT 0
 NULL,
 "ISSUEDOBJECTFLAG" INT DEFAULT 0
 NULL,
 "RELATIONSHIP" VARCHAR(50) DEFAULT '1,2,3'
 NULL,
 "OWNERID" VARCHAR(50) NOT NULL,
 "EXTENSIONJSON" CLOB NULL,
 "POLICYPUSHTIME" VARCHAR(50) NULL,
 "DELETEDELAYTIME" VARCHAR(50) NULL,
 "SPECIALTYPEFLAG" INT DEFAULT 0
 NULL,
 "CMDS" VARCHAR(100) NULL,
 "DISTTYPE" INT DEFAULT 0
 NULL,
 "ORIGINJSON" CLOB NULL,
 "POLICYITEM" INT NULL,
 "COPYNUM" INT DEFAULT 1
 NULL,
 "OLDWRAPPAPP" CLOB NULL,
 "ALARMID" BIGINT NULL
);
CREATE TABLE "T_PERM_TEMPLATE_MENU"
(
 "ID" BIGINT IDENTITY(46,1) NOT NULL,
 "TEMPLATEID" BIGINT NOT NULL,
 "CODE" VARCHAR(50) NOT NULL,
 "AUTHORITY" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_PERM_TEMPLATE_API"
(
 "ID" BIGINT IDENTITY(1876,1) NOT NULL,
 "TEMPLATEID" BIGINT NOT NULL,
 "APICODE" VARCHAR(50) NULL,
 "FUNCCODE" VARCHAR(50) NULL
);
CREATE TABLE "T_PERM_TEMPLATE"
(
 "ID" BIGINT IDENTITY(208,1) NOT NULL,
 "NAME" VARCHAR(100) NOT NULL,
 "DESCRIPTION" VARCHAR(200) NULL,
 "SYSFLAG" INT DEFAULT 0
 NULL,
 "LOGINID" VARCHAR(50) NULL
);
CREATE TABLE "T_NOTIFICATIONS_LOGON"
(
 "NOTIFICATION_ID" BIGINT(20) NOT NULL,
 "CREATE_TIME" TIMESTAMP(0) NOT NULL,
 "DELETED" TINYINT DEFAULT 0
 NOT NULL,
 "READ" TINYINT DEFAULT 0
 NOT NULL,
 "SENDER" VARCHAR(255) NOT NULL,
 "RECEIVED" VARCHAR(50) NOT NULL,
 "CONTENT" CLOB NOT NULL
);
CREATE TABLE "T_NOTIFICATION"
(
 "ID" VARCHAR(100) NOT NULL,
 "CLIENTID" VARCHAR(100) NOT NULL,
 "MESSAGE" CLOB NOT NULL,
 "STATUS" SMALLINT NOT NULL,
 "TYPE" VARCHAR(100) NOT NULL,
 "SILENT" SMALLINT NOT NULL,
 "EVENT" VARCHAR(100) NOT NULL,
 "COMMENTS" VARCHAR(500) NULL,
 "CREATEDDATETIME" TIMESTAMP(0) NOT NULL,
 "UPDATEDDATETIME" TIMESTAMP(0) NOT NULL
);
CREATE TABLE "T_MEM_TASK"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "TYPE" INT NULL,
 "TIMES" INT NULL,
 "PRIORITY" INT NULL,
 "FAILCAUSE" VARCHAR(300) NULL,
 "LOGINID" VARCHAR(50) NULL,
 "UDID" VARCHAR(50) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_MALWARE_LIST"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "PKGNAME" VARCHAR(200) NULL,
 "UUID" VARCHAR(200) NULL,
 "VERSION" VARCHAR(50) NULL,
 "NAME" VARCHAR(200) NULL,
 "SCANID" BIGINT NOT NULL,
 "HANDLESTATUS" INT DEFAULT 0
 NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "MALWAREID" VARCHAR(40) NULL
);
CREATE TABLE "T_LOG_PFYH"
(
 "ID" BIGINT IDENTITY(59763,1) NOT NULL,
 "LOGINID" VARCHAR(50) NULL,
 "APPID" VARCHAR(50) NULL,
 "OPERTIME" TIMESTAMP(0) NULL,
 "OPERDESC" VARCHAR(500) NULL
);
CREATE TABLE "T_LOCATION_HISTORY"
(
 "ID" BIGINT NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "UDID" VARCHAR(50) NULL,
 "UUID" VARCHAR(100) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "STATUS" INT NULL,
 "LONGITUDE" DOUBLE NULL,
 "LATITUDE" DOUBLE NULL,
 "LOCATION" VARCHAR(200) NULL,
 "LOCATEDTIME" TIMESTAMP(0) NULL,
 "DAYFLAG" INT NULL
)PARTITION BY HASH("DAYFLAG")
 PARTITIONS 60;
CREATE TABLE "T_LDAP_CONFIG"
(
 "ID" BIGINT NOT NULL,
 "TYPE" VARCHAR(10) NOT NULL,
 "ROOTNAME" VARCHAR(100) NOT NULL,
 "URL" VARCHAR(100) NOT NULL,
 "BASE" VARCHAR(100) NOT NULL,
 "DOMAIN" VARCHAR(100) NULL,
 "USERNAME" VARCHAR(100) NOT NULL,
 "PASSWORD" VARCHAR(100) NOT NULL,
 "LOGINFILTER" VARCHAR(100) NULL,
 "CONFLICTHANDLE" INT DEFAULT 0
 NULL,
 "LDAPVERIFY" INT DEFAULT 0
 NULL,
 "AUTOSYNCINTERVAL" INT DEFAULT 0
 NULL,
 "PARENTGROUPID" BIGINT DEFAULT 0
 NULL,
 "PARENTGROUPNAME" VARCHAR(100) NULL,
 "LASTSYNCSTARTTIME" TIMESTAMP(0) NULL,
 "LASTSYNCTIME" TIMESTAMP(0) NULL,
 "LASTSYNCRESULT" VARCHAR(100) NULL,
 "LOGINID" VARCHAR(50) NULL,
 "NAME" VARCHAR(50) NULL,
 "MAIL" VARCHAR(50) NULL,
 "MOBILE" VARCHAR(50) NULL,
 "SYNCFLAG" INT DEFAULT 0
 NULL,
 "USERFILTER" VARCHAR(100) NULL,
 "OUFILTER" VARCHAR(100) NULL,
 "LASTSYNCUSERS" INT NULL,
 "LASTSYNCUGROUPS" INT NULL,
 "GROUPNAME" VARCHAR(100) NULL
);
CREATE TABLE "T_LAST_LOCATION"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "UDID" VARCHAR(50) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "LONGITUDE" DOUBLE NULL,
 "LATITUDE" DOUBLE NULL,
 "LOCATION" VARCHAR(200) NULL,
 "LOCATEDTIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_LABEL"
(
 "ID" BIGINT IDENTITY(2,1) NOT NULL,
 "NAME" VARCHAR(100) NOT NULL,
 "TYPE" INT NOT NULL,
 "DESCRIPTION" VARCHAR(200) NULL,
 "CREATOR" VARCHAR(50) NOT NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "UPDATETIME" TIMESTAMP(0) NOT NULL
);
CREATE TABLE "T_IOS_MODEL_DICT"
(
 "MODEL" VARCHAR(200) NOT NULL,
 "GENERATION" VARCHAR(200) NULL,
 "VARIANT" VARCHAR(200) NULL,
 "IDENTIFIER" VARCHAR(200) NULL,
 "COLOR" VARCHAR(200) NULL,
 "STORAGE" VARCHAR(200) NULL
);
CREATE TABLE "T_IOS_BUILDIN_APP"
(
 "ID" BIGINT IDENTITY(176,1) NOT NULL,
 "NAME" VARCHAR(200) NOT NULL,
 "PKGNAME" VARCHAR(200) NULL,
 "MODELTYPE" VARCHAR(20) DEFAULT '20,21,22,23'
 NULL
);
CREATE TABLE "T_IND_STRATEGY_MAX_SET"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "STRATEGYID" VARCHAR(100) NULL,
 "STRATEGYTYPE" INT NULL,
 "LOGINID" VARCHAR(50) NULL
);
CREATE TABLE "T_INDEX_STRATEGY_SET"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "STRATEGYID" VARCHAR(100) NULL,
 "STRATEGYTYPE" INT NULL,
 "LOGINID" VARCHAR(50) NULL
);
CREATE TABLE "T_INDEX_SHORTCUT_SET"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "IDENTIFIER" VARCHAR(20) NULL,
 "URL" VARCHAR(200) NULL,
 "CLASSNAME" VARCHAR(20) NULL,
 "REMARK" VARCHAR(200) NULL,
 "LOGINID" VARCHAR(50) NULL,
 "HOVERCLASSNAME" VARCHAR(50) NULL,
 "MENUCODE" VARCHAR(20) NULL,
 "FUNCCODE" VARCHAR(20) NULL
);
CREATE TABLE "T_INDEX_SHORTCUT_DEF"
(
 "ID" BIGINT IDENTITY(18,1) NOT NULL,
 "IDENTIFIER" VARCHAR(20) NULL,
 "URL" VARCHAR(200) NULL,
 "CLASSNAME" VARCHAR(20) NULL,
 "REMARK" VARCHAR(200) NULL,
 "HOVERCLASSNAME" VARCHAR(50) NULL,
 "MENUCODE" VARCHAR(20) NULL,
 "FUNCCODE" VARCHAR(20) NULL
);
CREATE TABLE "T_INDEX_CHART_SET"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "IDENTIFIER" VARCHAR(20) NULL,
 "REMARK" VARCHAR(200) NULL,
 "LOGINID" VARCHAR(50) NULL
);
CREATE TABLE "T_INDEX_CHART_DEF"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "IDENTIFIER" VARCHAR(20) NULL,
 "REMARK" VARCHAR(200) NULL
);
CREATE TABLE "T_INDEX_APP_SET"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "APPID" BIGINT NULL,
 "LOGINID" VARCHAR(50) NULL
);
CREATE TABLE "T_INDEX_APP_MAX_SET"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "APPID" BIGINT NULL,
 "LOGINID" VARCHAR(50) NULL
);
CREATE TABLE "T_IMPORT_SERVER"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "SERVERTYPE" INT NOT NULL,
 "HOSTNAME" VARCHAR(300) NULL,
 "SERVERNAME" VARCHAR(300) NULL,
 "AUTHNAME" VARCHAR(300) NULL,
 "AUTHPASSWORD" VARCHAR(300) NULL,
 "ROOTPATH" VARCHAR(300) NULL,
 "SYNCFREQUENCY" INT NULL,
 "FILECOUNT" INT NULL,
 "FILETOTALSIZE" BIGINT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "CREATEBY" VARCHAR(100) NULL,
 "UPDATEBY" VARCHAR(100) NULL
);
CREATE TABLE "T_ILLEGAL_TIME"
(
 "ID" BIGINT IDENTITY(147,1) NOT NULL,
 "USERID" BIGINT NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "TYPE" INT NOT NULL,
 "ILLEGALDATE" VARCHAR(16) NOT NULL,
 "NUM" INT NOT NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "USERNAME" VARCHAR(100) NULL,
 "GROUPID" BIGINT NULL,
 "GROUPNAME" VARCHAR(100) NULL,
 "MOBILE" VARCHAR(20) NULL
);
CREATE TABLE "T_ILLEGAL_SMSSEND_LOG"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "ALERMID" BIGINT NOT NULL,
 "DEVICEIDS" VARCHAR(100) NULL,
 "POLICYID" VARCHAR(100) DEFAULT ''
 NOT NULL,
 "MOBILES" TEXT NULL,
 "EMAILS" TEXT NULL,
 "DESCRIPTION" VARCHAR(1000) NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL
);
CREATE TABLE "T_GROUP_MAP"
(
 "GROUPID" BIGINT NOT NULL,
 "HRGROUPID" VARCHAR(500) NOT NULL
);
CREATE TABLE "T_GROUP_CENTER"
(
 "ID" VARCHAR(100) NOT NULL,
 "NAME" VARCHAR(100) NOT NULL,
 "PARENTID" VARCHAR(100) NULL,
 "TYPE" INT DEFAULT 0
 NOT NULL,
 "GRAGE" INT DEFAULT 0
 NOT NULL,
 "DISPLAYFLAG" INT NULL,
 "NOTE" VARCHAR(2000) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_GROUP"
(
 "ID" BIGINT IDENTITY(3069,1) NOT NULL,
 "GUID" VARCHAR(100) NULL,
 "NAME" VARCHAR(100) NOT NULL,
 "PARENTID" BIGINT NULL,
 "CANLOGINSELF" INT DEFAULT 1
 NOT NULL,
 "CANREGISTDEVICE" INT DEFAULT 1
 NOT NULL,
 "CANELIMINATEDEVICE" INT DEFAULT 1
 NOT NULL,
 "ALLOWACTIVATENUM" INT DEFAULT 1
 NOT NULL,
 "TYPE" INT DEFAULT 0
 NOT NULL,
 "STATUS" INT DEFAULT 1
 NOT NULL,
 "DESCR" VARCHAR(600) NULL,
 "CREATTIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "ALLOWUNREGISTEREDACTIVATE" INT DEFAULT 1
 NULL,
 "ALLOWINCONSISTENTACTIVATE" INT DEFAULT 1
 NULL,
 "SYNCBACTCHNO" BIGINT DEFAULT 0
 NULL,
 "GROUPCODE" VARCHAR(500) NULL,
 "FORCEMODIFYPWD" INT DEFAULT 0
 NULL,
 "MAXPWDAGE" INT DEFAULT 0
 NULL,
 "MAXFAILEDATTEMPTS" INT DEFAULT 0
 NULL,
 "LOCKINTERVAL" INT DEFAULT 0
 NULL,
 "LDAPCONFIGID" BIGINT NULL,
 "NEEDLOCKPASSWD" INT DEFAULT 0
 NULL,
 "FORBIDUNLOAD" INT DEFAULT 1
 NULL,
 "PASSWORDSTRENGTH" INT DEFAULT 2
 NULL,
 "ALLOWACTIVATE" INT DEFAULT 1
 NOT NULL,
 "ALLOWLOGOUT" INT DEFAULT 1
 NULL,
 "THIRDGROUPID" VARCHAR(100) NULL,
 "SYNCFLAG" INT DEFAULT 0
 NULL,
 "ISSYNCGOOGLE" INT DEFAULT 0
 NOT NULL,
 "GOOGLEENTERPRISEID" VARCHAR(100) NULL,
 "GPATH" VARCHAR(500) NULL,
 "SYNCCONNECTORID" BIGINT NULL,
 "ORGID" VARCHAR(20) NULL,
 "ORGTYPE" VARCHAR(8) NULL
);
CREATE TABLE "T_GOOGLE_USER_PRODUCT"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "BEHAVIOR" VARCHAR(100) NULL,
 "USERIDS" CLOB NULL,
 "PRODUCTIDS" CLOB NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_GOOGLE_PLAY_PRODUCT"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "PRODUCTID" VARCHAR(100) NULL,
 "SMALLICONURL" VARCHAR(255) NULL,
 "ICONURL" VARCHAR(255) NULL,
 "TITLE" VARCHAR(255) NULL,
 "LASTUPDATEDTIME" TIMESTAMP(0) NULL,
 "AUTHORNAME" VARCHAR(100) NULL,
 "MINANDROIDSDKVERSION" INT NULL,
 "KIND" VARCHAR(50) NULL,
 "VERSIONCODE" INT NULL,
 "VERSIONSTRING" VARCHAR(50) NULL,
 "DETAILSURL" VARCHAR(255) NULL,
 "WORKDETAILSURL" VARCHAR(255) NULL,
 "MCMID" VARCHAR(20) NULL,
 "APPID" BIGINT NULL
);
CREATE TABLE "T_GOOGLE_LAYOUT_PAGE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "ORDERINLAYOUT" INT NULL,
 "PAGEID" VARCHAR(100) NULL,
 "PAGENAME" VARCHAR(100) NULL,
 "CLUSTERIDS" VARCHAR(1000) NULL,
 "CLUSTERNAMES" VARCHAR(1000) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_FOLDER_DIST_USER"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "FOLDERDISTRIBUTEID" BIGINT NULL,
 "USERID" BIGINT NULL,
 "CUSTOMFLAG" INT DEFAULT 0
 NULL,
 "EXCEPTIONFLAG" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_FOLDER_DIST_GROUP"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "FOLDERDISTRIBUTEID" BIGINT NULL,
 "GROUPID" BIGINT NULL,
 "CUSTOMFLAG" INT DEFAULT 0
 NULL,
 "EXCEPTIONFLAG" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_FOLDER_DISTRIBUTE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "FOLDERID" BIGINT NULL,
 "DESCRIPTION" VARCHAR(500) NULL,
 "USERTAGID" BIGINT NULL,
 "TIMETAGID" BIGINT NULL,
 "POSITIONTAGID" BIGINT NULL,
 "RELATIONSHIP" VARCHAR(50) NULL,
 "DISTRIBUTETYPE" INT NULL,
 "AUTHOPERTYPE" INT NULL,
 "LABELID" BIGINT NULL
);
CREATE TABLE "T_FOLDER"
(
 "ID" BIGINT IDENTITY(71,1) NOT NULL,
 "FOLDERNAME" VARCHAR(300) NULL,
 "FOLDERURL" VARCHAR(300) NULL,
 "FOLDERTYPE" INT NOT NULL,
 "FOLDERDIR" VARCHAR(500) NULL,
 "FOLDERDIRIDS" VARCHAR(500) NULL,
 "REMARK" VARCHAR(500) NULL,
 "PARENTFOLDERID" BIGINT NULL,
 "IMPORTSERVERID" BIGINT NULL,
 "ISDELETE" INT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "CREATEBY" VARCHAR(100) NULL,
 "UPDATEBY" VARCHAR(100) NULL,
 "TOPLEVEL" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_FILE_USER_STAR"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "FILEID" BIGINT NULL,
 "USERID" BIGINT NULL,
 "CREATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_FILE_USER_OPEN"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "FILEID" BIGINT NULL,
 "USERID" BIGINT NULL,
 "LASTOPENTIME" TIMESTAMP(0) NULL,
 "CREATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_FILE_DIST_USER"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "FILEDISTRIBUTEID" BIGINT NULL,
 "USERID" BIGINT NULL,
 "FILEID" BIGINT NULL
);
CREATE TABLE "T_FILE_DIST_GROUP"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "FILEDISTRIBUTEID" BIGINT NULL,
 "GROUPID" BIGINT NULL,
 "FILEID" BIGINT NULL
);
CREATE TABLE "T_FILE_DISTRIBUTE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "FILEID" BIGINT NULL,
 "RELATIONSHIP" VARCHAR(50) NULL,
 "DISTRIBUTETYPE" INT NULL,
 "AUTHOPERTYPE" INT NULL,
 "LABELID" BIGINT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "CREATOR" VARCHAR(20) NULL
);
CREATE TABLE "T_FILE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "FILENAME" VARCHAR(300) NULL,
 "FILEURL" VARCHAR(300) NULL,
 "FILEPDFURL" VARCHAR(300) NULL,
 "FILEICON" VARCHAR(300) NULL,
 "FILETYPE" INT NOT NULL,
 "FILEDIR" VARCHAR(500) NULL,
 "FILEDIRIDS" VARCHAR(500) NULL,
 "FILESIZE" BIGINT NULL,
 "FILESOURCE" INT NULL,
 "FILEMD5" VARCHAR(50) NULL,
 "CUSTOMVERSION" VARCHAR(100) NULL,
 "VERSIONCODE" INT NULL,
 "STATUS" INT NULL,
 "ISDELETE" INT NULL,
 "CONVERTFLAG" INT NULL,
 "FOLDERID" BIGINT NULL,
 "STARFLAG" INT NULL,
 "LOCKFLAG" INT NULL,
 "LOCKPASSWORD" VARCHAR(200) NULL,
 "DESCRIPTION" VARCHAR(500) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "CREATEBY" VARCHAR(100) NULL,
 "UPDATEBY" VARCHAR(100) NULL,
 "FILEPWD" VARCHAR(100) NULL
);
CREATE TABLE "T_FENCE_TRIGGER_LOG"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DEVICEUDID" VARCHAR(50) NOT NULL,
 "POLICYID" VARCHAR(50) NOT NULL,
 "FUNCTION" VARCHAR(50) NULL,
 "EXPECTION" INT NOT NULL,
 "RESULT" INT NOT NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL
);
CREATE TABLE "T_FENCE_INOUT_LOG"
(
 "ID" BIGINT IDENTITY(1971,1) NOT NULL,
 "UDID" VARCHAR(50) NOT NULL,
 "POLICYID" VARCHAR(50) NOT NULL,
 "EVENTTYPE" VARCHAR(10) NOT NULL,
 "STARTTIME" VARCHAR(50) NULL,
 "ENDTIME" VARCHAR(50) NULL,
 "LONGITUDE" DOUBLE NULL,
 "LATITUDE" DOUBLE NULL,
 "DISTANCE" REAL NULL,
 "UNIT" VARCHAR(20) NULL,
 "OCCURTIME" VARCHAR(50) NOT NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "FENCETYPE" INT NULL,
 "EFFECTIVEDATE" VARCHAR(50) NULL,
 "EXPIREDDATE" VARCHAR(50) NULL,
 "TYPE" INT NULL,
 "DAY" VARCHAR(50) NULL,
 "UPDATESTATUS" INT DEFAULT 0
 NOT NULL,
 "INOUTTYPE" INT NULL,
 "ISGEOFENCETYPE" INT NULL
);
CREATE TABLE "T_FENCE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "NAME" VARCHAR(200) NOT NULL,
 "TYPE" INT NOT NULL,
 "DESCR" VARCHAR(200) NULL,
 "TIMEZONE" VARCHAR(100) NULL,
 "BEGINDATE" DATE NULL,
 "ENDDATE" DATE NULL,
 "LONGITUDE" DOUBLE NULL,
 "LATITUDE" DOUBLE NULL,
 "DISTANCE" REAL NULL,
 "UNIT" INT NULL,
 "CREATOR" VARCHAR(50) NOT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_EXCEPTION"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "EXCEPTIONTYPE" INT NOT NULL,
 "CREATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_ENTRANCE_GUARD_PUSH"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "GUARDIDS" VARCHAR(255) NULL,
 "GUARDGROUPID" BIGINT NULL,
 "LOGINID" VARCHAR(50) NULL,
 "DEVICERELATIONSHIP" VARCHAR(50) DEFAULT '0'
 NOT NULL,
 "CREATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_ENTRANCE_GUARD_PUG"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "GUARDID" BIGINT NULL,
 "GROUPID" BIGINT NULL,
 "GUARDPUSHID" BIGINT NULL,
 "CREATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_ENTRANCE_GUARD_PU"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "GUARDID" BIGINT NULL,
 "USERID" BIGINT NULL,
 "GUARDPUSHID" BIGINT NULL,
 "CREATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_ENTRANCE_GUARD_LOG"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DEVICEID" BIGINT NULL,
 "UDID" VARCHAR(50) NULL,
 "USERID" BIGINT NULL,
 "GUARDDATA" VARCHAR(50) NOT NULL,
 "OPER" VARCHAR(10) NOT NULL,
 "OPERTIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_ENTRANCE_GUARD_GROUP"
(
 "ID" BIGINT IDENTITY(2,1) NOT NULL,
 "GUARDGROUPNAME" VARCHAR(25) NOT NULL,
 "REMARK" VARCHAR(255) NULL,
 "STATUS" INT DEFAULT 1
 NOT NULL,
 "LOGINID" VARCHAR(50) NOT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_ENTRANCE_GUARD_DEVICE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "GUARDID" BIGINT NOT NULL,
 "GUARDPUSHID" BIGINT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "STATUS" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_ENTRANCE_GUARD"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "GUARDNAME" VARCHAR(50) NOT NULL,
 "GUARDDATA" VARCHAR(50) NOT NULL,
 "GUARDGROUPID" BIGINT NOT NULL,
 "STATUS" INT DEFAULT 1
 NOT NULL,
 "LOGINID" VARCHAR(50) NOT NULL,
 "REMARK" VARCHAR(255) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_EMM_TOKEN"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "HOST_ID" VARCHAR(50) NOT NULL,
 "APP_ID" VARCHAR(50) NOT NULL,
 "APP_PASS_TOKEN" VARCHAR(50) NOT NULL,
 "EXPIRE_TIME" TIMESTAMP(0) NOT NULL,
 "CREATE_TIME" TIMESTAMP(0) NOT NULL,
 "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
 NOT NULL
);
CREATE TABLE "T_EMM_PINCODE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "PINCODE" VARCHAR(20) NOT NULL,
 "PRINCIPLE" VARCHAR(50) NOT NULL,
 "PINCODE_MODE" VARCHAR(20) NOT NULL,
 "PROXY_RECORD_ID" VARCHAR(50) NOT NULL,
 "EXPIRE_TIME" TIMESTAMP(0) NOT NULL,
 "STATUS" VARCHAR(10) NOT NULL,
 "CREATE_TIME" TIMESTAMP(0) NOT NULL,
 "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
 NOT NULL
);
CREATE TABLE "T_EMM_GRANT"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "PINCODE_ID" DECIMAL(20,0) NOT NULL,
 "HOST_ID" VARCHAR(50) NOT NULL,
 "CREDENTIAL" VARCHAR(200) NOT NULL,
 "CREATE_TIME" TIMESTAMP(0) NOT NULL,
 "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
 NOT NULL,
 "STATUS" VARCHAR(20) DEFAULT 'ACTIVATION'
 NOT NULL
);
CREATE TABLE "T_EMM_CLIENT_LOGIN"
(
 "ID" BIGINT IDENTITY(1039,1) NOT NULL,
 "EMM_CLIENT_ID" VARCHAR(50) NOT NULL,
 "LOGINID" VARCHAR(50) NOT NULL,
 "STATUS" VARCHAR(10) NOT NULL,
 "LAST_LOGIN_TIME" TIMESTAMP(0) NULL,
 "LAST_LOGOUT_TIME" TIMESTAMP(0) NULL,
 "CREATE_TIME" TIMESTAMP(0) NOT NULL,
 "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
 NOT NULL
);
CREATE TABLE "T_DYNAMIC_LABEL_USER"
(
 "ID" BIGINT IDENTITY(16,1) NOT NULL,
 "LABELID" BIGINT NOT NULL,
 "PARAMNAME" VARCHAR(100) NOT NULL,
 "PARAMVALUE" VARCHAR(1000) NOT NULL
);
CREATE TABLE "T_DOC_GROUP_VERSION"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "GROUPID" BIGINT NOT NULL,
 "VERSION" DECIMAL(20,0) NOT NULL,
 "UPDATETIME" VARCHAR(45) NOT NULL
);
CREATE TABLE "T_DOCUMENT_USER_VERSION"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "USERID" BIGINT NOT NULL,
 "VERSION" DECIMAL(20,0) NOT NULL,
 "UPDATETIME" VARCHAR(45) NOT NULL
);
CREATE TABLE "T_DOCUMENT_TAG_USER"
(
 "ID" INT IDENTITY(1,1) NOT NULL,
 "TAGID" INT NOT NULL,
 "USERID" BIGINT NOT NULL
);
CREATE TABLE "T_DOCUMENT_TAG_LINK"
(
 "ID" BIGINT NOT NULL,
 "DOCID" BIGINT NULL,
 "TAGID" INT NULL,
 "DISTRIBUTE" BIGINT DEFAULT 0
 NOT NULL,
 "OPERTYPE" BIGINT DEFAULT 0
 NOT NULL
);
CREATE TABLE "T_DOCUMENT_TAG_GROUP"
(
 "ID" INT IDENTITY(1,1) NOT NULL,
 "TAGID" INT NOT NULL,
 "GROUPID" BIGINT NOT NULL
);
CREATE TABLE "T_DOCUMENT_TAG"
(
 "ID" INT IDENTITY(1,1) NOT NULL,
 "NAME" VARCHAR(100) NULL,
 "DESCRIPTION" VARCHAR(500) NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "UPDATETIME" TIMESTAMP(0) NOT NULL,
 "TYPE" BIGINT DEFAULT 0
 NOT NULL
);
CREATE TABLE "T_DOCUMENT_STATISTICS"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "BASEYMD" DATE NULL,
 "FILEID" BIGINT NULL,
 "OPERTYPE" INT NULL,
 "OPERCOUNT" BIGINT NULL,
 "CREATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_DOCUMENT_OPER_LOG"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "FILEID" BIGINT NULL,
 "OPERTYPE" INT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "OPERBY" VARCHAR(100) NULL
);
CREATE TABLE "T_DOCUMENT_LOG"
(
 "ID" BIGINT NOT NULL,
 "DOCID" BIGINT NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "OPERTYPE" INT DEFAULT 0
 NOT NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL
);
CREATE TABLE "T_DOCUMENT"
(
 "ID" BIGINT NOT NULL,
 "NAME" VARCHAR(100) NULL,
 "URL" VARCHAR(200) NULL,
 "ICON" VARCHAR(200) NULL,
 "DESCRIPTION" VARCHAR(500) NULL,
 "TYPE" INT DEFAULT 0
 NOT NULL,
 "TAGID" INT NULL,
 "STATUS" INT NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "UPDATETIME" TIMESTAMP(0) NOT NULL,
 "CREATEBY" VARCHAR(50) NULL,
 "UPDATEBY" VARCHAR(50) NULL
);
CREATE TABLE "T_DEVICE_WRAPAPP"
(
 "DEVICEID" BIGINT NOT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "FORBIDDENAPP" VARCHAR(3000) NULL
);
CREATE TABLE "T_DEVICE_WECHAT_LOG"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "IMEI" VARCHAR(50) NULL,
 "ACCOUNT" VARCHAR(100) NULL,
 "NAME" VARCHAR(100) NULL,
 "TYPE" INT NULL,
 "LOGINTIME" TIMESTAMP(0) NULL,
 "LOGOUTTIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_DEVICE_WECHAT_LINKMAN"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DEVICEWECHATID" BIGINT NULL,
 "VERSION" VARCHAR(50) NULL,
 "ACCOUNT" VARCHAR(100) NULL,
 "NAME" VARCHAR(100) NULL,
 "HEADPORTRAIT" VARCHAR(255) NULL,
 "AUTOGRAPH" VARCHAR(100) NULL,
 "PROVINCE" VARCHAR(100) NULL,
 "AREA" VARCHAR(100) NULL,
 "SOURCE" VARCHAR(100) NULL,
 "QRCODE" VARCHAR(255) NULL,
 "SEX" INT NULL,
 "REMARK" VARCHAR(255) NULL,
 "BLACKLIST" INT NULL,
 "STARFRIEND" INT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_DEVICE_WECHAT"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DEVICEID" BIGINT NULL,
 "VERSION" VARCHAR(50) NULL,
 "IMEI" VARCHAR(50) NULL,
 "ACCOUNT" VARCHAR(100) NULL,
 "NAME" VARCHAR(100) NULL,
 "HEADPORTRAIT" VARCHAR(255) NULL,
 "AUTOGRAPH" VARCHAR(100) NULL,
 "PROVINCE" VARCHAR(100) NULL,
 "AREA" VARCHAR(100) NULL,
 "QRCODE" VARCHAR(255) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_DEVICE_USING_LOG"
(
 "ID" BIGINT IDENTITY(3213,1) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "IMSI" VARCHAR(50) NULL,
 "OPERATORNAME" VARCHAR(200) NULL,
 "PHONECODE" VARCHAR(100) NULL,
 "SIMCHANGEINFO" VARCHAR(200) NULL,
 "SIMCARDFLOW" INT NULL,
 "WLANFLOW" INT NULL,
 "CREATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_DEVICE_USERCHECKIN"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "USERID" BIGINT NOT NULL,
 "LOGINID" VARCHAR(50) DEFAULT ''
 NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "USERNAME" VARCHAR(100) DEFAULT ''
 NOT NULL,
 "MOBILE" VARCHAR(40) NULL,
 "DEVICENAME" VARCHAR(100) DEFAULT ''
 NOT NULL,
 "GROUPNAME" VARCHAR(100) NULL,
 "GROUPID" BIGINT NOT NULL,
 "RELATIONSHIP" INT NOT NULL,
 "LONGITUDE" DOUBLE NULL,
 "LATITUDE" DOUBLE NULL,
 "OCCUREDDATE" TIMESTAMP(0) NOT NULL,
 "CREATETIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
 NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_DEVICE_TRAFFIC"
(
 "ID" BIGINT IDENTITY(263,1) NOT NULL,
 "LOGINID" VARCHAR(50) DEFAULT ''
 NOT NULL,
 "UDID" VARCHAR(50) NOT NULL,
 "ENDTIME" TIMESTAMP(0) NOT NULL,
 "SIMTRAFFIC" BIGINT DEFAULT 0
 NULL,
 "WIFITRAFFIC" BIGINT DEFAULT 0
 NULL,
 "MOBILE" VARCHAR(20) NULL,
 "USERNAME" VARCHAR(50) NULL,
 "DEVICENAME" VARCHAR(50) NULL,
 "GROUPID" BIGINT NULL,
 "RELATIONSHIP" INT NULL,
 "PLATFORMTYPE" INT NULL
);
CREATE TABLE "T_DEVICE_TMP"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "UUID" VARCHAR(50) NULL,
 "USERID" BIGINT NOT NULL,
 "UDID" VARCHAR(50) NULL,
 "IMEI" VARCHAR(50) NULL,
 "IMSI" VARCHAR(50) NULL,
 "BUYTIME" DATE NULL,
 "WARRANTY" INT NULL,
 "DEVICETYPE" INT DEFAULT 10
 NOT NULL,
 "TYPE" INT DEFAULT 1
 NOT NULL,
 "RELATIONSHIP" INT DEFAULT 1
 NOT NULL,
 "DEVICENAME" VARCHAR(100) NULL,
 "DEVICENUMBER" VARCHAR(50) NULL,
 "ICCID" VARCHAR(50) NULL,
 "SERIALNUM" VARCHAR(50) NULL,
 "MANUFACTURER" VARCHAR(200) NULL,
 "MODEL" VARCHAR(100) NULL,
 "OS" VARCHAR(100) NULL,
 "VERSIONUM" VARCHAR(100) NULL,
 "PHONECODE" VARCHAR(100) NULL,
 "CPU" VARCHAR(100) NULL,
 "RAM" VARCHAR(100) NULL,
 "ROMCAPACITY" VARCHAR(100) NULL,
 "ROMAVAILABLECAPACITY" VARCHAR(100) NULL,
 "SDCAPACITY" VARCHAR(100) NULL,
 "SDAVAILABLECAPACITY" VARCHAR(100) NULL,
 "SDSERIALNUM" VARCHAR(100) NULL,
 "CAMERA" VARCHAR(100) NULL,
 "WIFIMAC" VARCHAR(30) NULL,
 "BLUETOOTHMAC" VARCHAR(30) NULL,
 "POWERSTATUS" VARCHAR(100) NULL,
 "BOOTTIME" BIGINT NULL,
 "CAPACITY" VARCHAR(100) NULL,
 "CAPACITYSTATUS" VARCHAR(100) NULL,
 "AVAILABLECAPACITY" VARCHAR(100) NULL,
 "IP" VARCHAR(20) NULL,
 "ENCRYPTIONLEVEL" INT NULL,
 "ROOTFLAG" INT DEFAULT 0
 NULL,
 "LASTONLINETIME" TIMESTAMP(0) NULL,
 "ONLINEFLAG" INT DEFAULT 0
 NULL,
 "JAILBREAKFLAG" INT DEFAULT 0
 NULL,
 "STATUS" INT NULL,
 "REGISTTIME" TIMESTAMP(0) NULL,
 "ACTIVATETIME" TIMESTAMP(0) NULL,
 "TOKEN" VARCHAR(200) NULL,
 "PUSHMAGIC" VARCHAR(200) NULL,
 "UNLOCKTOKEN" VARCHAR(4000) NULL,
 "CHALLENGE" VARCHAR(200) NULL,
 "SENDREGISTNOTICEFLAG" INT DEFAULT 0
 NULL,
 "ALLOWACTROOTORJAILBREAKFLAG" INT DEFAULT 0
 NULL,
 "REMARK" VARCHAR(500) NULL,
 "ROAMINGFLAG" INT DEFAULT 0
 NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "APNSTOKEN" VARCHAR(200) NULL,
 "LOSTFLAG" INT DEFAULT 0
 NULL,
 "DATAENCRYPTIONFLAG" INT DEFAULT 0
 NULL,
 "SPECIALTYPEFLAG" INT DEFAULT 0
 NULL,
 "PAUSEFLAG" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_DEVICE_SYSEVENT_LOG"
(
 "ID" BIGINT IDENTITY(1685,1) NOT NULL,
 "UDID" VARCHAR(50) NOT NULL,
 "EVENTTYPE" INT NOT NULL,
 "EVENTRESULT" VARCHAR(50) NOT NULL,
 "CREATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_DEVICE_STATUS"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "UDID" VARCHAR(50) NOT NULL,
 "COMPONENTTYPE" INT NULL,
 "STATUS" INT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "DEVICEID" BIGINT NULL,
 "VIOLATIONID" BIGINT NULL
);
CREATE TABLE "T_DEVICE_SECURITYINFO"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "HARDWAREENCRYPTIONCAPS" INT DEFAULT 0
 NOT NULL,
 "PASSCODEPRESENT" INT DEFAULT 0
 NOT NULL,
 "PASSCODECOMPLIANT" INT DEFAULT 0
 NOT NULL,
 "PASSCODECOMPLIANTWITHPROFILES" INT DEFAULT 0
 NOT NULL
);
CREATE TABLE "T_DEVICE_SAMSUNG"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "BLUETOOTHSTATUS" TINYINT DEFAULT 0
 NULL,
 "CAMERASTATUS" TINYINT DEFAULT 0
 NULL,
 "MICROPHONESTATUS" TINYINT DEFAULT 0
 NULL,
 "WIFISTATUS" TINYINT DEFAULT 0
 NULL,
 "NFCSTATUS" TINYINT DEFAULT 0
 NULL,
 "SDCARDSTATUS" TINYINT DEFAULT 0
 NULL,
 "GPSSTATUS" TINYINT DEFAULT 0
 NULL,
 "CELLULARDATASTATUS" TINYINT DEFAULT 0
 NULL,
 "ROAMINGDATASTATUS" TINYINT DEFAULT 0
 NULL,
 "ROAMINGPUSHSTATUS" TINYINT DEFAULT 0
 NULL,
 "ROAMINGSYNCSTATUS" TINYINT DEFAULT 0
 NULL,
 "ROAMINGVOICECALLSSTATUS" TINYINT DEFAULT 0
 NULL
);
CREATE TABLE "T_DEVICE_REMOTECONTROL"
(
 "ID" BIGINT IDENTITY(9162,1) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "UDID" VARCHAR(50) NULL,
 "UUID" VARCHAR(100) NULL,
 "PARAMCONTENT" VARCHAR(500) NULL,
 "OPERTYPE" INT NOT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "STATUS" INT NULL
);
CREATE TABLE "T_DEVICE_PWD"
(
 "ID" BIGINT IDENTITY(8354,1) NOT NULL,
 "UUID" VARCHAR(50) NOT NULL,
 "UDID" VARCHAR(50) NOT NULL,
 "DEVICE_ID" BIGINT NOT NULL,
 "IMEI" VARCHAR(50) NULL,
 "PWD" VARCHAR(10) NULL,
 "STATUS" TINYINT NULL,
 "CREATE_TIME" TIMESTAMP(0) NOT NULL,
 "UPDATE_TIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_DEVICE_PROFILE"
(
 "ID" BIGINT IDENTITY(517,1) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "UDID" VARCHAR(50) NULL,
 "POLICYID" VARCHAR(100) NOT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "STATUS" INT NULL,
 "FENCESTATUS" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_DEVICE_POSITION"
(
 "ID" BIGINT IDENTITY(58,1) NOT NULL,
 "PULLTIME" TIMESTAMP(0) NULL,
 "UDID" VARCHAR(100) NULL,
 "LONGITUDE" VARCHAR(20) NULL,
 "LATITUDE" VARCHAR(20) NULL,
 "ADDRESS" VARCHAR(100) NULL,
 "LOGINID" VARCHAR(50) NULL,
 "PKGNAME" VARCHAR(200) NULL,
 "PLATFORM" INT NULL,
 "TYPE" INT NULL,
 "APPNAME" VARCHAR(100) NULL,
 "DESCRIPTION" VARCHAR(100) NULL
);
CREATE TABLE "T_DEVICE_OPER_LOG"
(
 "ID" BIGINT IDENTITY(382,1) NOT NULL,
 "USERID" BIGINT NOT NULL,
 "LOGINID" VARCHAR(50) NOT NULL,
 "NAME" VARCHAR(50) NOT NULL,
 "OPERTYPE" VARCHAR(100) NOT NULL,
 "OPERTIME" TIMESTAMP(0) NOT NULL,
 "DEVICENAME" VARCHAR(100) NULL,
 "SERIALNUM" VARCHAR(50) NULL,
 "REMARKS" VARCHAR(500) NULL
);
CREATE TABLE "T_DEVICE_NETWORK_LOG"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "USERID" BIGINT NOT NULL,
 "LOGINID" VARCHAR(50) NOT NULL,
 "USERNAME" VARCHAR(150) DEFAULT ''
 NULL,
 "MOBILE" VARCHAR(50) NULL,
 "UDID" VARCHAR(50) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "DEVICENAME" VARCHAR(150) DEFAULT ''
 NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL
);
CREATE TABLE "T_DEVICE_MSG"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "UDID" VARCHAR(50) DEFAULT ''
 NOT NULL,
 "MSGTYPE" INT DEFAULT 0
 NULL,
 "SMSTYPE" INT DEFAULT 0
 NULL,
 "ORIGINALNO" VARCHAR(20) NULL,
 "TERMINALNO" VARCHAR(20) NULL,
 "HAPPENTIME" TIMESTAMP(0) NOT NULL,
 "CONTENT" VARCHAR(500) NULL,
 "LOGINID" VARCHAR(50) NULL,
 "USERNAME" VARCHAR(50) NULL,
 "DEVICENAME" VARCHAR(50) NULL,
 "GROUPID" BIGINT NULL,
 "RELATIONSHIP" INT NULL,
 "PLATFORMTYPE" INT NULL
);
CREATE TABLE "T_DEVICE_MODEL"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "MODEL" VARCHAR(100) NULL,
 "TYPE" INT DEFAULT 1
 NOT NULL,
 "PICTUREPATH" VARCHAR(200) NOT NULL
);
CREATE TABLE "T_DEVICE_HISTORY"
(
 "ID" BIGINT IDENTITY(658,1) NOT NULL,
 "UDID" VARCHAR(50) DEFAULT ''
 NOT NULL,
 "LOGINID" VARCHAR(50) NULL,
 "USERNAME" VARCHAR(50) NULL,
 "DEVICENAME" VARCHAR(50) NULL,
 "GROUPID" BIGINT NULL,
 "RELATIONSHIP" INT NULL,
 "PLATFORMTYPE" INT NULL,
 "PRODUCTNAME" VARCHAR(100) NULL,
 "MODEL" VARCHAR(100) NULL,
 "OS" VARCHAR(100) NULL,
 "VERSIONNUM" VARCHAR(100) NULL,
 "SERIALNUM" VARCHAR(50) NULL,
 "REGISTTIME" TIMESTAMP(0) NULL,
 "ACTIVATETIME" TIMESTAMP(0) NULL,
 "STATUS" INT NULL,
 "ROOTFLAG" INT DEFAULT 0
 NULL,
 "JAILBREAKFLAG" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_DEVICE_FILE_STATUS"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "IMEI" VARCHAR(50) NULL,
 "DEVICENUMBER" VARCHAR(50) NULL,
 "SYSTEMID" VARCHAR(50) NOT NULL,
 "UDID" VARCHAR(50) NULL,
 "CREATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_DEVICE_EXCEPTION"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DEVICEID" BIGINT NULL,
 "USERID" BIGINT NULL
);
CREATE TABLE "T_DEVICE_DIAGNOSE_LOG"
(
 "ID" BIGINT IDENTITY(2,1) NOT NULL,
 "FILENAME" VARCHAR(100) NULL,
 "DEVICEID" BIGINT NOT NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "BEGINTIME" TIMESTAMP(0) NOT NULL,
 "ENDTIME" TIMESTAMP(0) NOT NULL,
 "WIFI" INT DEFAULT 0
 NOT NULL,
 "DEVICENAME" VARCHAR(100) NULL,
 "USERID" BIGINT NULL,
 "GROUPID" BIGINT NULL,
 "PLATFORM" INT DEFAULT 1
 NOT NULL,
 "TRIGGERMODE" INT DEFAULT 0
 NOT NULL,
 "STATUS" INT DEFAULT 0
 NOT NULL,
 "PATH" VARCHAR(500) NULL,
 "OPERATOR" VARCHAR(50) NULL,
 "TYPE" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_DEVICE_CRYPTOMODULE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "RESULT" VARCHAR(50) NULL,
 "MODULETYPE" VARCHAR(50) NULL,
 "MANUFACTURE" VARCHAR(50) NULL,
 "MODULEID" VARCHAR(50) NULL,
 "DEVICEID" BIGINT NOT NULL
);
CREATE TABLE "T_DEVICE_COLLECT"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "TYPE" INT NULL,
 "MANUFACTURER" VARCHAR(200) NULL,
 "MODEL" VARCHAR(100) NULL,
 "VERSIONNUM" VARCHAR(100) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "CREATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_DEVICE_CMD_SEND_STATE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "UDID" VARCHAR(100) NULL,
 "UUID" VARCHAR(100) NULL,
 "OPERTYPE" INT NULL,
 "STATUS" INT NULL,
 "PARAMCONTENT" VARCHAR(200) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_DEVICE_CHECK_DEVICE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "CHECKID" BIGINT NOT NULL,
 "DEVICEID" BIGINT NOT NULL
);
CREATE TABLE "T_DEVICE_CHECK"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "MANUFACTURER" VARCHAR(200) NULL,
 "MODEL" VARCHAR(100) NULL,
 "UDID" VARCHAR(50) NULL,
 "IMEI" VARCHAR(50) NULL,
 "IMSI" VARCHAR(50) NULL
);
CREATE TABLE "T_DEVICE_CERT"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "CONTENT1" VARCHAR(1000) NULL,
 "CONTENT2" VARCHAR(1000) NULL,
 "DEVICEID" BIGINT NOT NULL
);
CREATE TABLE "T_DEVICE_CALLOVER_LOG"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "LOGINID" VARCHAR(50) NOT NULL,
 "UDID" VARCHAR(50) NOT NULL,
 "USERNAME" VARCHAR(150) DEFAULT ''
 NULL,
 "MOBILE" VARCHAR(50) NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "DEVICEID" BIGINT NOT NULL
);
CREATE TABLE "T_DEVICE_CALL"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "UDID" VARCHAR(50) DEFAULT ''
 NOT NULL,
 "CALLTYPE" INT DEFAULT 0
 NULL,
 "ORIGINALNO" VARCHAR(20) NULL,
 "TERMINALNO" VARCHAR(20) NULL,
 "STARTTIME" TIMESTAMP(0) NOT NULL,
 "DURATION" INT DEFAULT 0
 NULL,
 "LOCATION" VARCHAR(100) NULL,
 "LOGINID" VARCHAR(50) NULL,
 "USERNAME" VARCHAR(50) NULL,
 "DEVICENAME" VARCHAR(50) NULL,
 "GROUPID" BIGINT NULL,
 "RELATIONSHIP" INT NULL,
 "PLATFORMTYPE" INT NULL
);
CREATE TABLE "T_DEVICE_BROWSERHISTORY"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "USERID" BIGINT NOT NULL,
 "LOGINID" VARCHAR(50) DEFAULT ''
 NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "USERNAME" VARCHAR(100) DEFAULT ''
 NOT NULL,
 "DEVICENAME" VARCHAR(100) DEFAULT ''
 NOT NULL,
 "GROUPID" BIGINT NOT NULL,
 "RELATIONSHIP" INT NOT NULL,
 "URL" VARCHAR(2000) DEFAULT ''
 NOT NULL,
 "TITLE" VARCHAR(150) NULL,
 "ACCESSTIME" TIMESTAMP(0) NOT NULL,
 "GROUPNAME" VARCHAR(100) NULL
);
CREATE TABLE "T_DEVICE_APP_ACTION"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "APPNAME" VARCHAR(50) DEFAULT ''
 NOT NULL,
 "PKGNAME" VARCHAR(50) DEFAULT ''
 NOT NULL,
 "VERSIONNAME" VARCHAR(50) DEFAULT ''
 NOT NULL,
 "VERSIONCODE" VARCHAR(50) DEFAULT ''
 NOT NULL,
 "STATUS" INT NULL,
 "OPERTIME" TIMESTAMP(0) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_DEVICE_APPUSAGE"
(
 "ID" BIGINT IDENTITY(3033,1) NOT NULL,
 "USERID" BIGINT NOT NULL,
 "LOGINID" VARCHAR(50) DEFAULT ''
 NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "USERNAME" VARCHAR(100) DEFAULT ''
 NOT NULL,
 "DEVICENAME" VARCHAR(100) DEFAULT ''
 NOT NULL,
 "GROUPID" BIGINT NOT NULL,
 "RELATIONSHIP" INT NOT NULL,
 "PKGNAME" VARCHAR(100) DEFAULT ''
 NOT NULL,
 "APPNAME" VARCHAR(100) NOT NULL,
 "VERSION" VARCHAR(100) NULL,
 "VENDOR" VARCHAR(100) NULL,
 "PLATFORM" INT NOT NULL,
 "USAGECOUNT" INT NOT NULL,
 "USAGEDURATION" INT NOT NULL,
 "MOBILEDATA" INT NOT NULL,
 "WIFIDATA" INT NOT NULL,
 "OCCUREDDATE" TIMESTAMP(0) NOT NULL,
 "CREATETIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
 NULL,
 "UPDATETIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
 NULL
);
CREATE TABLE "T_DEVICE_APP"
(
 "ID" BIGINT IDENTITY(7613,1) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "NAME" VARCHAR(255) NOT NULL,
 "PACKAGENAME" VARCHAR(255) NULL,
 "PUBLICKEY" VARCHAR(2048) NULL,
 "VERSIONNAME" VARCHAR(255) NULL,
 "VERSIONCODE" VARCHAR(255) NULL,
 "SCANTIME" TIMESTAMP(0) NULL,
 "CERTSHA1" VARCHAR(50) NULL,
 "TYPE" INT NULL,
 "APPSIZE" INT NULL,
 "APPID" DECIMAL(20,0) NULL,
 "VERSION" VARCHAR(100) NULL,
 "APPDATASIZE" INT NULL,
 "USERID" BIGINT NULL,
 "STATUS" BIGINT NULL,
 "ITUNESSTOREID" BIGINT NULL,
 "APPFLAG" INT DEFAULT 1
 NULL,
 "FIRSTINSTALLTIME" TIMESTAMP(0) NULL,
 "LASTUPDATETIME" TIMESTAMP(0) NULL,
 "DEVELOPER" VARCHAR(100) NULL,
 "SIMSENDFLOW" VARCHAR(30) NULL,
 "SIMRECVFLOW" VARCHAR(30) NULL,
 "WIFISENDFLOW" VARCHAR(30) NULL,
 "WIFIRECVFLOW" VARCHAR(30) NULL,
 "POWERCONSUMPTION" VARCHAR(30) NULL,
 "RUNNINGTIME" VARCHAR(30) NULL,
 "EXCEPTIONCOUNT" VARCHAR(30) NULL
);
CREATE TABLE "T_DEVICE_APN_TOKEN"
(
 "ID" BIGINT IDENTITY(412,1) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "UDID" VARCHAR(45) NULL,
 "TOKEN" VARCHAR(260) NULL,
 "TYPE" BIGINT DEFAULT 0
 NOT NULL,
 "PKGNAME" VARCHAR(200) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_DEVICE_APN"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "APNID" INT NOT NULL,
 "DESCRIPTION" VARCHAR(500) NULL,
 "APNNAME" VARCHAR(50) NULL,
 "APNTYPE" VARCHAR(50) NULL,
 "NETWORKCODE" VARCHAR(50) NULL,
 "MCC" VARCHAR(50) NULL,
 "MNC" VARCHAR(50) NULL,
 "PROXY" VARCHAR(50) NULL,
 "PORT" VARCHAR(50) NULL,
 "MMSPROXY" VARCHAR(50) NULL,
 "MMSPORT" VARCHAR(50) NULL,
 "USERNAME" VARCHAR(50) NULL,
 "SERVER" VARCHAR(50) NULL,
 "PASSWORD" VARCHAR(50) NULL,
 "MMSC" VARCHAR(50) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "DEVICEID" BIGINT NOT NULL
);
CREATE TABLE "T_DEVICE_ACCESSWEB"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "USERID" BIGINT NOT NULL,
 "LOGINID" VARCHAR(50) DEFAULT ''
 NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "USERNAME" VARCHAR(100) DEFAULT ''
 NOT NULL,
 "DEVICENAME" VARCHAR(100) DEFAULT ''
 NOT NULL,
 "GROUPID" BIGINT NOT NULL,
 "RELATIONSHIP" INT NOT NULL,
 "URL" VARCHAR(2000) DEFAULT ''
 NOT NULL,
 "TITLE" VARCHAR(150) NULL,
 "ACCESSTIME" TIMESTAMP(0) NOT NULL,
 "GROUPNAME" VARCHAR(100) NULL,
 "APPNAME" VARCHAR(100) NULL,
 "HOSTNAME" VARCHAR(100) NULL
);
CREATE TABLE "T_DEVICE"
(
 "ID" BIGINT IDENTITY(20645,1) NOT NULL,
 "USERID" BIGINT NULL,
 "SHORTUDID" VARCHAR(10) NULL,
 "UDID" VARCHAR(50) NULL,
 "IDFA" VARCHAR(50) NULL,
 "IMEI" VARCHAR(50) NULL,
 "IMSI" VARCHAR(50) NULL,
 "BUYTIME" DATE NULL,
 "WARRANTY" INT NULL,
 "DEVICETYPE" INT DEFAULT 10
 NOT NULL,
 "TYPE" INT DEFAULT 1
 NOT NULL,
 "RELATIONSHIP" INT DEFAULT 1
 NOT NULL,
 "DEVICENAME" VARCHAR(100) NULL,
 "DEVICENUMBER" VARCHAR(50) NULL,
 "INITSIMINFO" VARCHAR(50) NULL,
 "INITSDSERIALNUM" VARCHAR(100) NULL,
 "ICCID" VARCHAR(50) NULL,
 "SERIALNUM" VARCHAR(50) NULL,
 "MANUFACTURER" VARCHAR(200) NULL,
 "MODEL" VARCHAR(100) NULL,
 "OS" VARCHAR(100) NULL,
 "VERSIONUM" VARCHAR(100) NULL,
 "PHONECODE" VARCHAR(100) NULL,
 "CPU" VARCHAR(100) NULL,
 "RAM" VARCHAR(100) NULL,
 "ROMCAPACITY" VARCHAR(100) NULL,
 "ROMAVAILABLECAPACITY" VARCHAR(100) NULL,
 "SDCAPACITY" VARCHAR(100) NULL,
 "SDAVAILABLECAPACITY" VARCHAR(100) NULL,
 "SDSERIALNUM" VARCHAR(100) NULL,
 "CAMERA" VARCHAR(100) NULL,
 "WIFIMAC" VARCHAR(30) NULL,
 "BLUETOOTHMAC" VARCHAR(30) NULL,
 "POWERSTATUS" VARCHAR(100) NULL,
 "BOOTTIME" BIGINT NULL,
 "CAPACITY" VARCHAR(100) NULL,
 "CAPACITYSTATUS" VARCHAR(100) NULL,
 "AVAILABLECAPACITY" VARCHAR(100) NULL,
 "IP" VARCHAR(20) NULL,
 "ENCRYPTIONLEVEL" INT NULL,
 "ROOTFLAG" INT DEFAULT 0
 NULL,
 "LASTONLINETIME" TIMESTAMP(0) NULL,
 "ONLINEFLAG" INT DEFAULT 0
 NULL,
 "JAILBREAKFLAG" INT DEFAULT 0
 NULL,
 "STATUS" INT DEFAULT 1
 NULL,
 "REGISTTIME" TIMESTAMP(0) NULL,
 "ACTIVATETIME" TIMESTAMP(0) NULL,
 "TOKEN" VARCHAR(200) NULL,
 "PUSHMAGIC" VARCHAR(200) NULL,
 "UNLOCKTOKEN" VARCHAR(4000) NULL,
 "CHALLENGE" VARCHAR(200) NULL,
 "SENDREGISTNOTICEFLAG" INT DEFAULT 0
 NULL,
 "ALLOWACTROOTORJAILBREAKFLAG" INT DEFAULT 0
 NULL,
 "REMARK" VARCHAR(500) NULL,
 "ROAMINGFLAG" INT DEFAULT 0
 NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "APNSTOKEN" VARCHAR(200) NULL,
 "LOSTFLAG" INT DEFAULT 0
 NULL,
 "DATAENCRYPTIONFLAG" INT DEFAULT 0
 NULL,
 "SPECIALTYPEFLAG" INT DEFAULT 0
 NULL,
 "KNOXSTATUS" INT DEFAULT 0
 NULL,
 "PRODUCTNAME" VARCHAR(100) NULL,
 "OFFLINESTATUS" INT DEFAULT 0
 NOT NULL,
 "OFFLINETHRESHOLD" VARCHAR(5) DEFAULT '0'
 NOT NULL,
 "EMMLOGINAGAIN" INT DEFAULT 0
 NULL,
 "HOSTID" VARCHAR(50) NULL,
 "USAGESTATS" INT DEFAULT 0
 NULL,
 "FLOWUPDATE" INT DEFAULT 0
 NULL,
 "FLOWQUOTA" INT DEFAULT 0
 NULL,
 "CLIENTVERSION" VARCHAR(30) DEFAULT ''
 NULL,
 "BITLOCKER" INT NULL,
 "MEID" VARCHAR(50) NULL,
 "RESOLUTION" VARCHAR(50) NULL,
 "OSCOREVERSION" VARCHAR(50) NULL,
 "OSSOFTWAREVERSION" VARCHAR(50) NULL,
 "SAFETYOSVERSION" VARCHAR(50) NULL,
 "PATCHLEVEL" VARCHAR(50) NULL,
 "ICCID2" VARCHAR(50) NULL,
 "IMSI2" VARCHAR(50) NULL,
 "NETWORKTYPE" VARCHAR(50) NULL,
 "WLANADAPTERCHIP" VARCHAR(50) NULL,
 "BTADAPTERCHIP" VARCHAR(50) NULL,
 "NFCCHIP" VARCHAR(50) NULL,
 "LOCATORCHIP" VARCHAR(50) NULL,
 "CLIENTBUILDNUM" VARCHAR(50) NULL,
 "CPURATIO" VARCHAR(30) NULL,
 "MEMORYRATIO" VARCHAR(30) NULL,
 "STORAGERATIO" VARCHAR(30) NULL,
 "BLUETOOTHSTATE" INT NULL,
 "WIFISTATE" INT NULL,
 "CAMERASTATE" INT NULL,
 "MICROPHONESTATE" INT NULL,
 "MOBILEDATASTATE" INT NULL,
 "APN" VARCHAR(500) NULL,
 "BUILDNUMBER" VARCHAR(200) NULL,
 "GPSSTATE" INT NULL,
 "SYNCFLAG" INT DEFAULT 0
 NULL,
 "DUALSTATUS" INT NULL,
 "SIMOPER" INT NULL,
 "TPMREPORT" INT NULL,
 "SYSTEMINTEGRITY" INT NULL,
 "IDP" VARCHAR(20) NULL,
 "IDPDEVICEID" VARCHAR(100) NULL,
 "APPTYPE" VARCHAR(10) NULL,
 "SUBGROUPID" BIGINT NULL,
 "ORGCODE" VARCHAR(10) NULL,
 "LOGINID" VARCHAR(50) NULL,
 "MAINTAINFLAG" INT NULL,
 "SCREENPWD" VARCHAR(10) NULL,
 "WANT_CHANGED_PWD" VARCHAR(10) NULL,
 "LABEL" VARCHAR(20) NULL,
 "ERASEFLAG" INT NULL
);
CREATE TABLE "T_CONTACT_VERSION"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "VERSION" VARCHAR(45) NOT NULL,
 "VERSION_NO" INT NOT NULL,
 "ACTIVED" INT DEFAULT 0
 NOT NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "UPDATETIME" TIMESTAMP(0) NOT NULL
);
CREATE TABLE "T_CONTACT_LOG"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "OPERTYPE" INT DEFAULT 0
 NOT NULL,
 "USERID" BIGINT NOT NULL,
 "DISPLAY" VARCHAR(100) NULL,
 "FAMILY" VARCHAR(100) NULL,
 "GIVEN" VARCHAR(100) NULL,
 "MIDDLE" VARCHAR(100) NULL,
 "PREDISPLAY" VARCHAR(100) NULL,
 "PREFAMILY" VARCHAR(100) NULL,
 "PREGIVEN" VARCHAR(100) NULL,
 "PREMIDDLE" VARCHAR(100) NULL,
 "CATEGORY" INT DEFAULT 0
 NOT NULL,
 "DATA" VARCHAR(200) NULL,
 "TYPE" VARCHAR(100) NULL,
 "TITLE" VARCHAR(200) NULL,
 "PREDATA" VARCHAR(200) NULL,
 "PRETYPE" VARCHAR(100) NULL,
 "PRETITLE" VARCHAR(200) NULL,
 "VERSION" VARCHAR(50) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "COLUMN_21" CHAR(10) NULL
);
CREATE TABLE "T_CONTACT_DATA"
(
 "ID" BIGINT NOT NULL,
 "CONTACTID" BIGINT NOT NULL,
 "CATEGORY" INT DEFAULT 0
 NULL,
 "DATA" VARCHAR(200) NULL,
 "TYPE" VARCHAR(100) NULL,
 "TITLE" VARCHAR(200) NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "UPDATETIME" TIMESTAMP(0) NOT NULL
);
CREATE TABLE "T_CONTACT"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "DISPLAY" VARCHAR(100) NULL,
 "FAMILY" VARCHAR(100) NULL,
 "GIVEN" VARCHAR(100) NULL,
 "MIDDLE" VARCHAR(100) NULL,
 "USERID" BIGINT NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "UPDATETIME" TIMESTAMP(0) NOT NULL
);
CREATE TABLE "T_CONNECTOR"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "NAME" VARCHAR(100) NOT NULL,
 "TYPE" VARCHAR(20) NOT NULL,
 "CONFIG" TEXT NOT NULL,
 "OVERRIDEORIGNORE" VARCHAR(100) NULL,
 "AUTOSYNCINTERVAL" INT DEFAULT 0
 NULL,
 "MOUNTGROUPID" BIGINT DEFAULT 0
 NULL,
 "LASTSYNCSTARTTIME" TIMESTAMP(0) NULL,
 "LASTSYNCENDTIME" TIMESTAMP(0) NULL,
 "LASTSYNCSTATUS" VARCHAR(100) NULL,
 "LASTSYNCSTATS" TEXT NULL,
 "SYNCBATCHNO" BIGINT NULL
);
CREATE TABLE "T_CONFIG"
(
 "ID" INT IDENTITY(4,1) NOT NULL,
 "K" VARCHAR(255) NOT NULL,
 "V" VARCHAR(255) NOT NULL,
 "DESCRIPTION" VARCHAR(255) NULL
);
CREATE TABLE "T_COMPLIANCE_SCHEDULE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "TASKLEVEL" INT NOT NULL,
 "TASKCODE" VARCHAR(50) NOT NULL,
 "PLATFORMTYPE" INT NOT NULL,
 "UDID" VARCHAR(50) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "VIOLATIONID" BIGINT NOT NULL,
 "CONDID" INT NOT NULL,
 "PROCSTRATEGYID" BIGINT NULL,
 "PROCESSID" INT NULL,
 "GRACEPERIOD" INT NULL,
 "PACKAGENAMES" VARCHAR(500) NULL,
 "DEVICEPROCID" BIGINT NULL,
 "PROCUUID" VARCHAR(50) NULL,
 "POLICYID" VARCHAR(100) NULL,
 "ACTIONCODE" VARCHAR(50) NOT NULL,
 "MEASURECODE" VARCHAR(50) DEFAULT ''
 NOT NULL,
 "JOBNAME" VARCHAR(50) NOT NULL,
 "JOBGROUP" VARCHAR(50) NOT NULL,
 "TRIGGERNAME" VARCHAR(50) NOT NULL,
 "TRIGGERGROUP" VARCHAR(50) NOT NULL,
 "CRONEXPRESSION" VARCHAR(100) NOT NULL,
 "TASKSTATUS" CHAR(1) DEFAULT '1'
 NOT NULL,
 "RESERVED1" VARCHAR(100) NULL,
 "RESERVED2" VARCHAR(100) NULL,
 "REMARK" VARCHAR(100) NULL,
 "CREATEDATE" TIMESTAMP(0) NOT NULL,
 "MODIFYDATE" TIMESTAMP(0) NOT NULL
);
CREATE TABLE "T_COMMAND_LOG"
(
 "ID" BIGINT IDENTITY(546,1) NOT NULL,
 "LOGTIME" VARCHAR(12) NULL,
 "NUM" BIGINT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_CLIENT_POLICY"
(
 "ID" VARCHAR(100) NOT NULL,
 "CLIENTID" VARCHAR(100) NOT NULL,
 "POLICYID" VARCHAR(100) NOT NULL,
 "STATUS" SMALLINT NOT NULL,
 "DISTRIBUTEDATETIME" TIMESTAMP(0) NOT NULL,
 "TRYTIMES" SMALLINT NOT NULL,
 "CHANGETIME" BIGINT NOT NULL,
 "CREATEDDATETIME" TIMESTAMP(0) NOT NULL,
 "UPDATEDDATETIME" TIMESTAMP(0) NOT NULL
);
CREATE TABLE "T_CLIENT"
(
 "ID" VARCHAR(100) NOT NULL,
 "HOSTID" VARCHAR(100) NOT NULL,
 "APPID" VARCHAR(200) NOT NULL,
 "TENANTID" VARCHAR(100) NOT NULL,
 "APPVERSION" VARCHAR(50) NULL,
 "PLATFORM" VARCHAR(100) NULL,
 "USERID" BIGINT NOT NULL,
 "STATUS" SMALLINT NOT NULL,
 "TOKEN" VARCHAR(500) NULL,
 "PNSTOKEN" VARCHAR(500) NULL,
 "PNSTOKENTYPE" VARCHAR(50) NULL,
 "CREATEDDATETIME" TIMESTAMP(0) NOT NULL,
 "UPDATEDDATETIME" TIMESTAMP(0) NOT NULL,
 "UDID" VARCHAR(50) NULL
);
CREATE TABLE "T_APP_TRAFFIC"
(
 "ID" BIGINT IDENTITY(2000,1) NOT NULL,
 "LOGINID" VARCHAR(50) NOT NULL,
 "UDID" VARCHAR(50) NOT NULL,
 "ENDTIME" TIMESTAMP(0) NOT NULL,
 "SIM1NUM" BIGINT DEFAULT 0
 NULL,
 "SIM2NUM" BIGINT DEFAULT 0
 NULL,
 "WIFINUM" BIGINT DEFAULT 0
 NULL,
 "APPPACKAGE" VARCHAR(100) NOT NULL,
 "APPNAME" VARCHAR(200) NOT NULL,
 "USERNAME" VARCHAR(50) NULL,
 "DEVICENAME" VARCHAR(50) NULL,
 "GROUPID" BIGINT NULL,
 "RELATIONSHIP" INT NULL,
 "PLATFORMTYPE" INT NULL
);
CREATE TABLE "T_APP_TIME_GROUP"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "APPID" BIGINT NOT NULL,
 "GROUPID" BIGINT NOT NULL,
 "STARTTIME" TIMESTAMP(0) NULL,
 "CUSTOMFLAG" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_APP_STRATEGY_USER"
(
 "ID" BIGINT IDENTITY(12,1) NOT NULL,
 "USERID" BIGINT NULL,
 "STRATEGYID" BIGINT NULL,
 "CUSTOMFLAG" INT DEFAULT 0
 NULL,
 "EXCEPTIONFLAG" INT DEFAULT 0
 NULL,
 "STRATEGYPUSHID" BIGINT NULL,
 "APPTYPE" VARCHAR(50) NULL
);
CREATE TABLE "T_APP_STRATEGY_STORE"
(
 "ID" BIGINT IDENTITY(20,1) NOT NULL,
 "STRATEGYID" BIGINT NOT NULL,
 "PACKAGENAME" VARCHAR(200) NOT NULL,
 "APPNAME" VARCHAR(200) NOT NULL,
 "APPVERSION" VARCHAR(50) NULL,
 "DESCRIPTION" VARCHAR(200) NULL,
 "ORDERNUM" INT NULL,
 "ICON" VARCHAR(2000) NULL
);
CREATE TABLE "T_APP_STRATEGY_PUSH"
(
 "ID" BIGINT IDENTITY(42,1) NOT NULL,
 "APPSTRATEGYID" BIGINT NOT NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "PUSHDEVICETYPE" VARCHAR(50) NOT NULL,
 "IRREPUSHFLAG" INT DEFAULT 1
 NULL,
 "LOGINID" VARCHAR(50) NULL
);
CREATE TABLE "T_APP_STRATEGY_LABEL"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "STRATEGYID" BIGINT NOT NULL,
 "LABELID" BIGINT NOT NULL
);
CREATE TABLE "T_APP_STRATEGY_IRRE_LOG"
(
 "ID" BIGINT IDENTITY(16,1) NOT NULL,
 "USERID" BIGINT NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "STRATEGYID" BIGINT NOT NULL,
 "PACKAGENAME" VARCHAR(200) NOT NULL,
 "APPNAME" VARCHAR(200) NULL,
 "APPVERSION" VARCHAR(50) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_APP_STRATEGY_GROUP"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "STRATEGYID" BIGINT NOT NULL,
 "GROUPID" BIGINT NOT NULL,
 "CUSTOMFLAG" INT NULL,
 "STRATEGYPUSHID" BIGINT NULL,
 "APPTYPE" VARCHAR(50) NULL
);
CREATE TABLE "T_APP_STRATEGY_DEVICE"
(
 "ID" BIGINT IDENTITY(86,1) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "UDID" VARCHAR(50) NULL,
 "STRATEGYID" BIGINT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "STATUS" INT NULL,
 "STRATEGYPUSHID" BIGINT NULL
);
CREATE TABLE "T_APP_STRATEGY"
(
 "ID" BIGINT IDENTITY(12,1) NOT NULL,
 "NAME" VARCHAR(200) NULL,
 "DESCRIPTION" VARCHAR(200) NULL,
 "TYPE" INT NOT NULL,
 "PLATFORMTYPE" INT NOT NULL,
 "PUSHDEVICETYPE" VARCHAR(50) NOT NULL,
 "IRREPUSHFLAG" INT NOT NULL,
 "STATUS" INT NOT NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "LOGINID" VARCHAR(100) NULL,
 "UPDATETIME" TIMESTAMP(0) NOT NULL,
 "UPDATEBY" VARCHAR(100) NULL,
 "DISTTYPE" INT DEFAULT 0
 NULL,
 "COPYNUM" INT DEFAULT 1
 NULL
);
CREATE TABLE "T_APP_STORE_USER_GROUP"
(
 "ID" VARCHAR(100) DEFAULT ''
 NOT NULL,
 "GROUPID" BIGINT NULL,
 "APPSTOREID" BIGINT NULL,
 "CUSTOMFLAG" INT DEFAULT 0
 NOT NULL,
 "ESSENTIALAPP" INT DEFAULT 0
 NULL,
 "APPPUSHID" BIGINT NULL,
 "APPCONF" VARCHAR(2000) NULL
);
CREATE TABLE "T_APP_STORE_USER"
(
 "ID" VARCHAR(100) DEFAULT ''
 NOT NULL,
 "USERID" BIGINT NULL,
 "APPSTOREID" BIGINT NULL,
 "CUSTOMFLAG" INT DEFAULT 0
 NULL,
 "EXCEPTIONFLAG" INT DEFAULT 0
 NULL,
 "ESSENTIALAPP" INT DEFAULT 0
 NULL,
 "APPPUSHID" BIGINT NULL,
 "APPCONF" VARCHAR(2000) NULL,
 "APPTYPE" VARCHAR(255) NULL
);
CREATE TABLE "T_APP_STORE_PATCH"
(
 "ID" BIGINT IDENTITY(41,1) NOT NULL,
 "PKGNAME" VARCHAR(200) NULL,
 "LVERSION" VARCHAR(50) NULL,
 "HVERSION" VARCHAR(50) NULL,
 "SOURCE" VARCHAR(1000) NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL
);
CREATE TABLE "T_APP_STORE_DEVICE"
(
 "ID" BIGINT IDENTITY(3108,1) NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "APPSTOREID" BIGINT NOT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "STATUS" INT NULL,
 "SAFECONTAINERSTATUS" INT DEFAULT 1
 NULL,
 "APPCONFSTATUS" INT DEFAULT 0
 NULL,
 "ENABLED" INT DEFAULT 1
 NULL,
 "ESSENTIALAPP" INT DEFAULT 0
 NULL,
 "APPPUSHID" BIGINT NULL,
 "APPCONF" VARCHAR(2000) NULL,
 "ISINPUTKNOX" INT DEFAULT 0
 NULL,
 "ISUEMCONTAINER" INT DEFAULT 0
 NULL,
 "PREVERSION" VARCHAR(50) NULL
);
CREATE TABLE "T_APP_STORE_CONF"
(
 "ID" BIGINT IDENTITY(13,1) NOT NULL,
 "NAME" VARCHAR(200) NOT NULL,
 "DESCRIPTION" VARCHAR(2000) NULL,
 "LOGINID" VARCHAR(50) NULL,
 "TYPE" INT NOT NULL,
 "APPCONF" TEXT NULL,
 "JSONCONF" TEXT NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "UPDATETIME" TIMESTAMP(0) NOT NULL,
 "COPYNUM" INT DEFAULT 1
 NULL,
 "FLAG" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_APP_STORE_CATEGORY"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "APPSTOREID" BIGINT NOT NULL,
 "APPCATEGORYID" INT NOT NULL
);
CREATE TABLE "T_APP_STORE_APPINFO"
(
 "ID" BIGINT IDENTITY(13224,1) NOT NULL,
 "APP_VERSION" VARCHAR(255) NULL,
 "APP_NAME" VARCHAR(255) NULL,
 "APP_PACKAGE" VARCHAR(255) NULL,
 "APP_ICON" VARCHAR(255) NULL,
 "APP_SIZE" INT NULL,
 "APP_TYPE" VARCHAR(255) NULL,
 "APP_FROM" VARCHAR(255) NULL,
 "APP_URL" VARCHAR(2000) NULL,
 "APP_DESC" VARCHAR(255) NULL,
 "PLATFORM" VARCHAR(128) DEFAULT ''
 NULL,
 "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
 NULL,
 "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
 NULL
);
CREATE TABLE "T_APP_STORE"
(
 "ID" BIGINT IDENTITY(205,1) NOT NULL,
 "NAME" VARCHAR(200) NOT NULL,
 "PKGNAME" VARCHAR(200) NULL,
 "VERSION" VARCHAR(50) NULL,
 "ICON" VARCHAR(200) NULL,
 "PRICE" VARCHAR(50) NULL,
 "APPSIZE" INT NULL,
 "BRIEF" VARCHAR(2000) NULL,
 "COMPANY" VARCHAR(200) NULL,
 "ITUNESSTOREID" BIGINT NULL,
 "PLATFORM" INT DEFAULT 1
 NOT NULL,
 "SOURCE" VARCHAR(1000) NULL,
 "DOWNLOADCOUNT" INT NULL,
 "DISTRIBUTETYPE" INT DEFAULT 1
 NULL,
 "TYPE" INT DEFAULT 1
 NOT NULL,
 "STATUS" BIGINT DEFAULT 0
 NOT NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "UPDATETIME" TIMESTAMP(0) NOT NULL,
 "OSVERSION" VARCHAR(200) NULL,
 "LOGINID" VARCHAR(50) NULL,
 "MODELTYPE" VARCHAR(20) DEFAULT '20,21,22,23'
 NULL,
 "DESCRIPTION" VARCHAR(2000) NULL,
 "CUSTOMVERSION" VARCHAR(50) NULL,
 "DISTRIBUTEMODE" INT DEFAULT 0
 NULL,
 "DEVICERELATIONSHIP" VARCHAR(50) NULL,
 "DELAPP" INT DEFAULT 0
 NULL,
 "PREVENTBACKUP" INT DEFAULT 0
 NULL,
 "WIFI" INT DEFAULT 0
 NULL,
 "CHECKFLAG" INT NULL,
 "STARTTIME" VARCHAR(50) NULL,
 "CHECKPERIOD" INT NULL,
 "FLAG" INT DEFAULT 1
 NULL,
 "CLIENTTYPE" INT DEFAULT 0
 NULL,
 "FILENAME" VARCHAR(200) NULL,
 "APPCONF" VARCHAR(2000) NULL,
 "URLSCHEME" VARCHAR(255) NULL,
 "VERSIONCODE" VARCHAR(20) NULL,
 "DOMAINTYPE" INT DEFAULT 0
 NULL,
 "FACETID" VARCHAR(200) NULL,
 "UUWRAPPER" INT NULL,
 "FILEHASH" VARCHAR(32) NULL,
 "SHOWWRAPPERICON" INT DEFAULT 1
 NOT NULL,
 "APPSOURCETYPE" INT DEFAULT 0
 NOT NULL,
 "AUDITCONTENT" VARCHAR(2000) NULL
);
CREATE TABLE "T_APP_SCHEDULE"
(
 "ID" VARCHAR(50) NOT NULL,
 "APPID" BIGINT NOT NULL,
 "USERIDS" VARCHAR(2000) NULL,
 "GROUPIDS" VARCHAR(2000) NULL,
 "JOBNAME" VARCHAR(100) NOT NULL,
 "JOBGROUP" VARCHAR(100) NOT NULL,
 "TRIGGERNAME" VARCHAR(100) NOT NULL,
 "TRIGGERGROUP" VARCHAR(100) NOT NULL,
 "CRONEXPRESSION" VARCHAR(200) NOT NULL
);
CREATE TABLE "T_APP_PUSH_USER_GROUP"
(
 "ID" VARCHAR(100) DEFAULT ''
 NOT NULL,
 "GROUPID" BIGINT NULL,
 "APPSTOREID" BIGINT NULL,
 "APPPUSHID" BIGINT NULL,
 "ESSENTIALAPP" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_APP_PUSH_USER"
(
 "ID" VARCHAR(100) DEFAULT ''
 NOT NULL,
 "USERID" BIGINT NULL,
 "APPSTOREID" BIGINT NULL,
 "ESSENTIALAPP" INT DEFAULT 0
 NULL,
 "APPPUSHID" BIGINT NULL
);
CREATE TABLE "T_APP_PUSH"
(
 "ID" BIGINT IDENTITY(477,1) NOT NULL,
 "APPSTOREID" BIGINT NOT NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "APPCONF" VARCHAR(2000) NULL,
 "LOGINID" VARCHAR(50) NULL,
 "DISTRIBUTEMODE" INT DEFAULT 0
 NULL,
 "DEVICERELATIONSHIP" VARCHAR(50) NULL,
 "DELAPP" INT DEFAULT 0
 NULL,
 "WIFI" INT DEFAULT 0
 NULL,
 "STARTTIME" TIMESTAMP(0) NULL,
 "DISTRIBUTETYPE" INT DEFAULT 1
 NULL,
 "ESSENTIALAPP" INT DEFAULT 0
 NULL,
 "PREVENTBACKUP" INT DEFAULT 0
 NULL,
 "ISINPUTKNOX" INT DEFAULT 0
 NULL,
 "APPCONFID" BIGINT NULL,
 "ISUEMCONTAINER" INT DEFAULT 0
 NULL,
 "SHOWICONONSYSDESKTOP" INT DEFAULT 0
 NULL,
 "PREVENTUNINSTALL" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_APP_OPERATION"
(
 "ID" BIGINT IDENTITY(42,1) NOT NULL,
 "PKGNAME" VARCHAR(100) NULL,
 "TYPE" INT NULL,
 "DESCRIPTION" VARCHAR(100) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "LOGINID" VARCHAR(50) NULL,
 "APPNAME" VARCHAR(100) NULL
);
CREATE TABLE "T_APP_DOWNLOAD_LOG"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "APPID" BIGINT NOT NULL,
 "NAME" VARCHAR(200) NOT NULL,
 "DEVICEID" BIGINT NULL,
 "DOWNLOADTIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP()
 NOT NULL
);
CREATE TABLE "T_APP_CATEGORY"
(
 "ID" INT IDENTITY(1,1) NOT NULL,
 "NAME" VARCHAR(200) NULL,
 "DESCRIPTION" VARCHAR(200) NULL,
 "PARENTID" BIGINT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL,
 "TYPE" BIGINT DEFAULT 0
 NULL,
 "LOGINID" VARCHAR(50) NULL
);
CREATE TABLE "T_APPLE_DEVICE_PROFILE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "SERIALNUMBER" VARCHAR(50) NOT NULL,
 "DEPPROFILEUUID" VARCHAR(40) NOT NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_APPLE_DEP_PROFILE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "UUID" VARCHAR(40) NOT NULL,
 "DESCRIPTION" VARCHAR(50) NULL,
 "PROFILENAME" VARCHAR(100) NOT NULL,
 "URL" VARCHAR(1000) NOT NULL,
 "SUPPORTPHONENUMBER" VARCHAR(50) NULL,
 "SUPPORTEMAILADDRESS" VARCHAR(200) NULL,
 "ORGMAGIC" VARCHAR(200) NULL,
 "DEPARTMENT" VARCHAR(100) NULL,
 "LANGUAGE" VARCHAR(15) NULL,
 "REGION" VARCHAR(15) NULL,
 "ANCHORCERTS" VARCHAR(1024) NULL,
 "SUPERVISINGHOSTCERTS" VARCHAR(1024) NULL,
 "SKIPSETUPITEMS" VARCHAR(1000) NULL,
 "ALLOWPAIRING" INT DEFAULT 1
 NOT NULL,
 "ISSUPERVISED" INT DEFAULT 1
 NOT NULL,
 "ISMULTIUSER" INT DEFAULT 0
 NOT NULL,
 "ISMANDATORY" INT DEFAULT 0
 NOT NULL,
 "AWAITDEVICECONFIGURED" INT DEFAULT 0
 NOT NULL,
 "ISMDMREMOVABLE" INT DEFAULT 1
 NOT NULL,
 "AUTOADVANCESETUP" INT DEFAULT 0
 NOT NULL,
 "LOGINID" VARCHAR(50) NOT NULL,
 "STATUS" INT DEFAULT 1
 NOT NULL,
 "CREATOR" VARCHAR(200) NULL,
 "CREATETIME" TIMESTAMP(0) NOT NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_APPLE_DEP_DEVICE"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "USERID" BIGINT NULL,
 "UUID" VARCHAR(50) NULL,
 "SERIALNUMBER" VARCHAR(50) NOT NULL,
 "DEVICEFAMILY" VARCHAR(20) NULL,
 "ASSETTAG" VARCHAR(100) NULL,
 "MODEL" VARCHAR(100) NULL,
 "OS" VARCHAR(100) NULL,
 "COLOR" VARCHAR(20) NULL,
 "DESCRIPTION" VARCHAR(200) NULL,
 "STATUS" INT DEFAULT 1
 NULL,
 "PROFILEUUID" VARCHAR(50) NULL,
 "PROFILEASSIGNTIME" TIMESTAMP(0) NULL,
 "PROFILEPUSHTIME" TIMESTAMP(0) NULL,
 "PROFILESTATUS" VARCHAR(20) NULL,
 "DEVICEASSIGNEDBY" VARCHAR(20) NULL,
 "DEVICEASSIGNEDDATE" TIMESTAMP(0) NULL,
 "CREATETIME" TIMESTAMP(0) NULL,
 "UPDATETIME" TIMESTAMP(0) NULL
);
CREATE TABLE "T_API_TOKEN"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "LOGINID" VARCHAR(50) NULL,
 "ACCESSTOKEN" VARCHAR(50) NULL,
 "EXPIREDATE" TIMESTAMP(0) NULL
);
CREATE TABLE "T_API_DICT"
(
 "CODE" VARCHAR(50) NOT NULL,
 "DESCR" VARCHAR(100) NULL,
 "URL" VARCHAR(200) NULL,
 "METHOD" VARCHAR(50) NULL,
 "MATCHRULE" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_ADMIN_LIST_DEFAULT"
(
 "ID" VARCHAR(50) NOT NULL,
 "LISTID" VARCHAR(50) NOT NULL,
 "FIELDNAME" VARCHAR(50) NOT NULL,
 "PRIORITYNO" INT NOT NULL,
 "DISPLAYFLAG" INT NOT NULL,
 "ORDERBYFLAG" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_ADMIN_LIST_CUSTOM"
(
 "ID" VARCHAR(50) NOT NULL,
 "LOGINID" VARCHAR(50) NOT NULL,
 "LISTID" VARCHAR(50) NOT NULL,
 "FIELDNAME" VARCHAR(50) NOT NULL,
 "PRIORITYNO" INT NOT NULL,
 "DISPLAYFLAG" INT NOT NULL,
 "ORDERBYFLAG" INT DEFAULT 0
 NULL
);
CREATE TABLE "T_ACCESSWEB_RESTRICTION"
(
 "ID" BIGINT IDENTITY(1,1) NOT NULL,
 "POLICYID" VARCHAR(100) NULL,
 "USERID" BIGINT NOT NULL,
 "LOGINID" VARCHAR(50) DEFAULT ''
 NOT NULL,
 "DEVICEID" BIGINT NOT NULL,
 "USERNAME" VARCHAR(100) DEFAULT ''
 NOT NULL,
 "DEVICENAME" VARCHAR(100) DEFAULT ''
 NOT NULL,
 "POLICYNAME" VARCHAR(100) NULL,
 "GROUPID" BIGINT NOT NULL,
 "RELATIONSHIP" INT NOT NULL,
 "URL" VARCHAR(2000) DEFAULT ''
 NOT NULL,
 "TITLE" VARCHAR(150) NULL,
 "ACCESSTIME" TIMESTAMP(0) NOT NULL,
 "GROUPNAME" VARCHAR(100) NULL,
 "APPNAME" VARCHAR(100) NULL,
 "HOSTNAME" VARCHAR(100) NULL,
 "UPDATESTATUS" INT NOT NULL
);
-- table end
-- comment start
COMMENT ON TABLE "T_VIRUSSCAN_LATEST" IS '最新一次病毒扫描记录表';

COMMENT ON COLUMN "T_VIRUSSCAN_LATEST"."DEVICEID" IS '设备ID';

COMMENT ON COLUMN "T_VIRUSSCAN_LATEST"."TOTALCOUNT" IS '扫描应用总数';

COMMENT ON COLUMN "T_VIRUSSCAN_LATEST"."MALWARECOUNT" IS '危险应用数';

COMMENT ON COLUMN "T_VIRUSSCAN_LATEST"."SCANSTATUS" IS '扫描状态(0 危险 / 1 安全 )';

COMMENT ON COLUMN "T_VIRUSSCAN_LATEST"."SCANTIME" IS '扫描时间';

COMMENT ON COLUMN "T_VIRUSSCAN_LATEST"."SCANID" IS '最近一次扫描ID(t_virusscan_history的ID)';

COMMENT ON COLUMN "T_VIRUSSCAN_LATEST"."CREATETIME" IS '创建时间';

COMMENT ON TABLE "T_VIRUSSCAN_HISTORY" IS '病毒扫描历史记录表';

COMMENT ON COLUMN "T_VIRUSSCAN_HISTORY"."DEVICEID" IS '设备ID';

COMMENT ON COLUMN "T_VIRUSSCAN_HISTORY"."TOTALCOUNT" IS '扫描应用总数';

COMMENT ON COLUMN "T_VIRUSSCAN_HISTORY"."MALWARECOUNT" IS '危险应用数';

COMMENT ON COLUMN "T_VIRUSSCAN_HISTORY"."SCANSTATUS" IS '扫描状态(0 危险 / 1 安全 )';

COMMENT ON COLUMN "T_VIRUSSCAN_HISTORY"."SCANTIME" IS '扫描时间';

COMMENT ON COLUMN "T_VIRUSSCAN_HISTORY"."CREATETIME" IS '创建时间';

CREATE INDEX "DEVICEID"
ON "T_VIOLATION_DEVICE_PROC"("DEVICEID");

COMMENT ON TABLE "T_VIOLATION_DEVICE_PROC" IS '违规设备处理结果表';

COMMENT ON COLUMN "T_VIOLATION_DEVICE_PROC"."ID" IS 'id';

COMMENT ON COLUMN "T_VIOLATION_DEVICE_PROC"."UUID" IS 'uuid';

COMMENT ON COLUMN "T_VIOLATION_DEVICE_PROC"."VIOLATIONID" IS '违规id';

COMMENT ON COLUMN "T_VIOLATION_DEVICE_PROC"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_VIOLATION_DEVICE_PROC"."PROCSTRATEGYID" IS '违规 处理策略id';

COMMENT ON COLUMN "T_VIOLATION_DEVICE_PROC"."PROCESSID" IS '违规 处理字典表id';

COMMENT ON COLUMN "T_VIOLATION_DEVICE_PROC"."PROCESSTIME" IS '处理时间';

COMMENT ON COLUMN "T_VIOLATION_DEVICE_PROC"."PROCESSSTATUS" IS '处理状态.0--未处理;1---成功;-1--处理失败';

COMMENT ON COLUMN "T_VIOLATION_DEVICE_PROC"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_VIOLATION_DEVICE_PROC"."UPDATETIME" IS '修改时间';

COMMENT ON TABLE "T_VIOLATION_DEVICE_APP" IS '违规设备应用违规明细表';

COMMENT ON COLUMN "T_VIOLATION_DEVICE_APP"."ID" IS 'id';

COMMENT ON COLUMN "T_VIOLATION_DEVICE_APP"."VIOLATIONID" IS '违规id';

COMMENT ON COLUMN "T_VIOLATION_DEVICE_APP"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_VIOLATION_DEVICE_APP"."APPSTRATEGYID" IS '应用策略id.黑名单id;白名单id';

COMMENT ON COLUMN "T_VIOLATION_DEVICE_APP"."PACKAGENAME" IS '应用包名';

COMMENT ON COLUMN "T_VIOLATION_DEVICE_APP"."APPVERSION" IS '应用版本';

COMMENT ON TABLE "T_VIOLATION_DEVICE" IS '违规设备表';

COMMENT ON COLUMN "T_VIOLATION_DEVICE"."ID" IS 'id';

COMMENT ON COLUMN "T_VIOLATION_DEVICE"."VIOLATIONID" IS '违规id';

COMMENT ON COLUMN "T_VIOLATION_DEVICE"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_VIOLATION_DEVICE"."CONDID" IS '违规 条件字典表id';

COMMENT ON COLUMN "T_VIOLATION_DEVICE"."VIOLATIONTYPE" IS '违规类型.1--系统类型;2--配置策略类;3--应用类型';

COMMENT ON COLUMN "T_VIOLATION_DEVICE"."CONDTITLE" IS '违规 条件标题';

COMMENT ON COLUMN "T_VIOLATION_DEVICE"."APPSTRATEGYID" IS '应用策略id.黑名单id;白名单id';

COMMENT ON COLUMN "T_VIOLATION_DEVICE"."POLICYID" IS '配置策略id';

COMMENT ON COLUMN "T_VIOLATION_DEVICE"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_VIOLATION_DEVICE"."UPDATETIME" IS '创建时间';

COMMENT ON COLUMN "T_VIOLATION_DEVICE"."ADMINALARMIDS" IS '管理员告警id多个管理员告警使用逗号分隔';

COMMENT ON TABLE "T_VIOLATION_COND_DICT" IS '违规 条件字典表 ';

COMMENT ON COLUMN "T_VIOLATION_COND_DICT"."CONDID" IS 'id';

COMMENT ON COLUMN "T_VIOLATION_COND_DICT"."VIOLATIONTYPE" IS '违规类型.1--系统类型;2--配置策略类;3--应用类型';

COMMENT ON COLUMN "T_VIOLATION_COND_DICT"."TITLE" IS '标题.';

COMMENT ON COLUMN "T_VIOLATION_ADMIN_ALARM"."ALARMNAME" IS '告警名称';

COMMENT ON COLUMN "T_VIOLATION_ADMIN_ALARM"."REPORTCYCLE" IS '报告周期(小时)';

COMMENT ON COLUMN "T_VIOLATION_ADMIN_ALARM"."EMAIL" IS '接收告警邮件地址';

COMMENT ON COLUMN "T_VIOLATION_ADMIN_ALARM"."PHONE" IS '接收告警的手机号';

COMMENT ON COLUMN "T_VIOLATION_ADMIN_ALARM"."LANGUAGE" IS '语言环境';

COMMENT ON COLUMN "T_VIOLATION_ADMIN_ALARM"."OWNERID" IS '管理者id';

COMMENT ON COLUMN "T_VIOLATION_ADMIN_ALARM"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_VIOLATION_ADMIN_ALARM"."UPDATETIME" IS '变更时间';

CREATE INDEX "VIOLATIONID"
ON "T_VIOLATIONS_USER"("VIOLATIONID");

CREATE INDEX "USERID"
ON "T_VIOLATIONS_USER"("USERID");

COMMENT ON TABLE "T_VIOLATIONS_USER" IS '违规策略分发用户表';

COMMENT ON COLUMN "T_VIOLATIONS_USER"."VIOLATIONID" IS '违规 id';

COMMENT ON COLUMN "T_VIOLATIONS_USER"."USERID" IS '用户id';

COMMENT ON COLUMN "T_VIOLATIONS_USER"."RELATIONSHIPS" IS '设备所属关系 1 企业 2 员工 3 其他 ';

CREATE INDEX "GROUPID"
ON "T_VIOLATIONS_GROUP"("GROUPID");

COMMENT ON TABLE "T_VIOLATIONS_GROUP" IS '违规策略分发用户组表';

COMMENT ON COLUMN "T_VIOLATIONS_GROUP"."VIOLATIONID" IS '违规 id';

COMMENT ON COLUMN "T_VIOLATIONS_GROUP"."GROUPID" IS '用户组id';

COMMENT ON COLUMN "T_VIOLATIONS_GROUP"."RELATIONSHIPS" IS '设备所属关系 1 企业 2 员工 3 其他 ';

COMMENT ON TABLE "T_VIOLATIONS_DEVICE_COPY" IS '违规策略分发用户表';

COMMENT ON COLUMN "T_VIOLATIONS_DEVICE_COPY"."VIOLATIONID" IS '违规 id';

COMMENT ON COLUMN "T_VIOLATIONS_DEVICE_COPY"."DEVICEID" IS '用户id';

COMMENT ON COLUMN "T_VIOLATIONS_DEVICE_COPY"."RELATIONSHIPS" IS '设备所属关系 1 企业 2 员工 3 其他 ';

COMMENT ON TABLE "T_VIOLATIONS_DEVICE" IS '违规策略分发设备表';

COMMENT ON COLUMN "T_VIOLATIONS_DEVICE"."VIOLATIONID" IS '违规 id';

COMMENT ON COLUMN "T_VIOLATIONS_DEVICE"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_VIOLATIONS_DEVICE"."RELATIONSHIPS" IS '设备所属关系 1 企业 2 员工 3 其他 ';

COMMENT ON TABLE "T_VIOLATIONS" IS '合规策略表';

COMMENT ON COLUMN "T_VIOLATIONS"."ID" IS 'id';

COMMENT ON COLUMN "T_VIOLATIONS"."VIOLATIONNAME" IS '违规名称';

COMMENT ON COLUMN "T_VIOLATIONS"."CONDID" IS '违规 条件字典表id';

COMMENT ON COLUMN "T_VIOLATIONS"."VIOLATIONTYPE" IS '违规类型.1--系统类型;2--配置策略类;3--应用类型';

COMMENT ON COLUMN "T_VIOLATIONS"."CONDVALUE" IS '违规 条件参数值';

COMMENT ON COLUMN "T_VIOLATIONS"."PLATFORMTYPES" IS '适用平台 1--android;2--ios;3--windows 8;4--windows phone8,多个平台以逗号分隔';

COMMENT ON COLUMN "T_VIOLATIONS"."RELATIONSHIP" IS '设备所属关系  1--公司设备;2--员工设备;3--其他,多种关系使用逗号分隔';

COMMENT ON COLUMN "T_VIOLATIONS"."USERALARMWAYS" IS '违规用户告警通知方式  1--邮件;2--push消息;3--短信,多种通知方式使用逗号分隔';

COMMENT ON COLUMN "T_VIOLATIONS"."ALARMID" IS '管理员告警id 多个管理员告警使用逗号分隔';

COMMENT ON COLUMN "T_VIOLATIONS"."PROCESSID" IS '违规 处理字典表id';

COMMENT ON COLUMN "T_VIOLATIONS"."GRACEPERIOD" IS '违规处理宽限时间(分钟)';

COMMENT ON COLUMN "T_VIOLATIONS"."STATUS" IS '违规策略状态,0--禁用;1--启用';

COMMENT ON COLUMN "T_VIOLATIONS"."CREATEBY" IS '管理者id';

COMMENT ON COLUMN "T_VIOLATIONS"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_VIOLATIONS"."UPDATETIME" IS '变更时间';

COMMENT ON COLUMN "T_VIOLATIONS"."LOCKPASS" IS '锁屏密码';

COMMENT ON COLUMN "T_VIOLATIONS"."GENTYPE" IS '生成方式 0-自动 1-手动';

COMMENT ON COLUMN "T_VIOLATIONS"."APPPKGLIST" IS '沙箱应用包名json';

COMMENT ON COLUMN "T_VIOLATIONS"."OLDAPPPKGLIST" IS '保存更新前的沙箱应用包名json';

COMMENT ON TABLE "T_VIOLATE_PROCESS_DICT" IS '违规 处理字典表 ';

COMMENT ON COLUMN "T_VIOLATE_PROCESS_DICT"."PROCESSID" IS 'id';

COMMENT ON COLUMN "T_VIOLATE_PROCESS_DICT"."TITLE" IS '标题';

COMMENT ON TABLE "T_VIOLATE_DIST_DEVICE" IS '违规分发设备表';

COMMENT ON COLUMN "T_VIOLATE_DIST_DEVICE"."ID" IS 'id';

COMMENT ON COLUMN "T_VIOLATE_DIST_DEVICE"."VIOLATIONID" IS '违规id';

COMMENT ON COLUMN "T_VIOLATE_DIST_DEVICE"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_VIOLATE_DIST_DEVICE"."CONDID" IS '违规 条件字典表id';

COMMENT ON COLUMN "T_VIOLATE_DIST_DEVICE"."CONDVALUE" IS '违规 条件参数值';

COMMENT ON COLUMN "T_VIOLATE_DIST_DEVICE"."USERALARMWAYS" IS '违规用户告警通知方式  1--邮件;2--push消息;3--短信,多种通知方式使用逗号分隔';

COMMENT ON COLUMN "T_VIOLATE_DIST_DEVICE"."ADMINALARMIDS" IS '管理员告警id 多个管理员告警使用逗号分隔';

COMMENT ON COLUMN "T_VIOLATE_DIST_DEVICE"."VIOLATIONPROCESS" IS '违规处理';

COMMENT ON COLUMN "T_VIOLATE_DIST_DEVICE"."STATUS" IS '执行状态,0--已分发;1--已生效';

COMMENT ON TABLE "T_VERSION" IS '版本表';

COMMENT ON COLUMN "T_VERSION"."OSTYPE" IS '1:android,2:ios';

COMMENT ON COLUMN "T_VERSION"."APPTYPE" IS '0:mdm,1:mcm';

COMMENT ON COLUMN "T_VERSION"."DOWNLOADTYPE" IS '1、server下载；2、store下载；0两者都行';

COMMENT ON COLUMN "T_VERSION"."SOURCE" IS 'apk相对路径';

COMMENT ON COLUMN "T_VERSION"."RELEASENOTE" IS '版本功能说明';

COMMENT ON COLUMN "T_VERSION"."RELEASETIME" IS '版本发布时间';

COMMENT ON COLUMN "T_VERSION"."DELSIGN" IS '是否删除标识,0:未删除,1:删除';

COMMENT ON COLUMN "T_USER_SIGNIN_LOG"."USERID" IS '用户ID';

COMMENT ON COLUMN "T_USER_SIGNIN_LOG"."FAILEDATTEMPTTIMES" IS '密码输错次数';

COMMENT ON COLUMN "T_USER_SIGNIN_LOG"."LASTFAILEDTIME" IS '上次密码输错时间';

COMMENT ON COLUMN "T_USER_SIGNIN_LOG"."LOCKSTATUS" IS '是否由于密码输错次数超限被锁定，1 锁定，0 正常';

COMMENT ON COLUMN "T_USER_SIGNIN_LOG"."LOCKEXPIRETIME" IS '密码锁定何时将失效，用户可以进行正常使用';

COMMENT ON COLUMN "T_USER_PIN"."ID" IS '用户id';

COMMENT ON COLUMN "T_USER_PIN"."PINCODE" IS '邀请码';

COMMENT ON COLUMN "T_USER_PIN"."PINEXPIREDATE" IS 'pincode失效截止日期';

COMMENT ON COLUMN "T_USER_PIN"."PINCODESENDSTATUS" IS 'pincode邀请邮件发送状态：0、邮件未发送；1、邮件发送成功；2、邮件发送失败';

COMMENT ON COLUMN "T_USER_PIN"."GENTYPE" IS '生成方式 0-自动 1-手动';

COMMENT ON COLUMN "T_USER_PIN"."SYNSTATUS" IS '同步状态 0-未同步，1-同步';

COMMENT ON TABLE "T_USER_FAMILY_PHONE" IS '用户亲情号表';

COMMENT ON COLUMN "T_USER_FAMILY_PHONE"."USERID" IS '用户id';

COMMENT ON COLUMN "T_USER_FAMILY_PHONE"."NAME" IS '名称';

COMMENT ON COLUMN "T_USER_FAMILY_PHONE"."PHONE" IS '手机号码';

COMMENT ON COLUMN "T_USER_FAMILY_PHONE"."REMARK" IS '备注';

COMMENT ON COLUMN "T_USER_FAMILY_PHONE"."TYPE" IS '0:导入;1手动录入';

COMMENT ON COLUMN "T_USER_FAMILY_PHONE"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_USER_FAMILY_PHONE"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_USER_CUSTOM_FIELD"."ID" IS '主键';

COMMENT ON COLUMN "T_USER_CUSTOM_FIELD"."FIELD" IS '自定义字段key';

COMMENT ON COLUMN "T_USER_CUSTOM_FIELD"."NAME" IS '自定义字段名称';

COMMENT ON TABLE "T_USER_CENTER" IS '设备用户导入中间表';

COMMENT ON COLUMN "T_USER_CENTER"."OPERTYPE" IS '操作类型：1-导入用户 2-导入设备 3-同时导入用户及设备';

COMMENT ON COLUMN "T_USER_CENTER"."LOGINID" IS '用户名';

COMMENT ON COLUMN "T_USER_CENTER"."PASSWORD" IS '密码';

COMMENT ON COLUMN "T_USER_CENTER"."NAME" IS '姓名';

COMMENT ON COLUMN "T_USER_CENTER"."MAIL" IS '邮件地址';

COMMENT ON COLUMN "T_USER_CENTER"."MOBILE" IS '联系电话';

COMMENT ON COLUMN "T_USER_CENTER"."LDAPGROUP" IS 'ldap组名';

COMMENT ON COLUMN "T_USER_CENTER"."DEVICETYPE" IS '设备类型 10-android phone 11-android pad;20-iphone 21-ipad 22-ipadmini 23- ipodtouch';

COMMENT ON COLUMN "T_USER_CENTER"."MODEL" IS '设备型号';

COMMENT ON COLUMN "T_USER_CENTER"."RELATIONSHIP" IS '设备所属关系  1--公司设备;2--员工设备;3--其他';

COMMENT ON COLUMN "T_USER_CENTER"."DEVICENUMBER" IS '设备编号';

COMMENT ON COLUMN "T_USER_CENTER"."SERIALNUM" IS '设备序列号';

COMMENT ON COLUMN "T_USER_CENTER"."VERSIONNUMBER" IS ' 版本号';

COMMENT ON COLUMN "T_USER_CENTER"."TYPE" IS '用户来源 1-文件导入 2-ad导入';

COMMENT ON COLUMN "T_USER_CENTER"."CONFLICT" IS '冲突原因 1-帐号冲突 0-不冲突';

COMMENT ON COLUMN "T_USER_CENTER"."DEVICENAME" IS '设备名称';

COMMENT ON COLUMN "T_USER_CENTER"."DEVICEPLATFORM" IS '平台1--android;2--ios';

COMMENT ON COLUMN "T_USER_CENTER"."DISPLAYGROUP" IS '组显示';

COMMENT ON COLUMN "T_USER_CENTER"."SIM" IS 'sim卡串号';

COMMENT ON COLUMN "T_USER_CENTER"."CUSTOM1" IS '自定义1';

COMMENT ON COLUMN "T_USER_CENTER"."CUSTOM2" IS '自定义2';

COMMENT ON COLUMN "T_USER_CENTER"."CUSTOM3" IS '自定义3';

COMMENT ON COLUMN "T_USER_CENTER"."CUSTOM4" IS '自定义4';

COMMENT ON COLUMN "T_USER_CENTER"."CUSTOM5" IS '自定义5';

COMMENT ON COLUMN "T_USER_CENTER"."PINCODE" IS '邀请码';

COMMENT ON COLUMN "T_USER_CENTER"."PWDTYPE" IS '密码生成方式 0-手动,1-自动';

COMMENT ON COLUMN "T_USER_CENTER"."PLAINPASSWORD" IS '可逆登录密码';

COMMENT ON COLUMN "T_USER_CENTER"."APPTYPE" IS '应用类型';

COMMENT ON COLUMN "T_USER_CENTER"."SUBGROUPID" IS '所属机构ID';

COMMENT ON COLUMN "T_USER_CENTER"."SUBGROUPNAME" IS '所属机构名称';

COMMENT ON TABLE "T_USER_BACK_THREAD_LOG" IS '内部接口执行的日志表';

COMMENT ON COLUMN "T_USER_BACK_THREAD_LOG"."TYPE" IS '操作类型 1-移动用户(批量) 2-删除用户 3-新增组 4-移动组 5-删除组';

COMMENT ON COLUMN "T_USER_BACK_THREAD_LOG"."RESULT" IS '操作结果 0-成功 1-失败';

COMMENT ON COLUMN "T_USER_BACK_THREAD_LOG"."DESTID" IS '被操作目标对象ID';

COMMENT ON COLUMN "T_USER_BACK_THREAD_LOG"."OLDPARENTID" IS '移动前所属组';

COMMENT ON COLUMN "T_USER_BACK_THREAD_LOG"."NEWPARENTID" IS '移动后所属组';

COMMENT ON COLUMN "T_USER_BACK_THREAD_LOG"."POLICYRESULT" IS '调用策略接口结果 0-成功 1-失败 --忽略';

COMMENT ON COLUMN "T_USER_BACK_THREAD_LOG"."APPRESULT" IS '调用应用接口结果 0-成功 1-失败 --忽略';

COMMENT ON COLUMN "T_USER_BACK_THREAD_LOG"."VIOLATIONRESULT" IS '调用合规接口结果 0-成功 1-失败 --忽略';

COMMENT ON COLUMN "T_USER_BACK_THREAD_LOG"."DEVICERESULT" IS '调用设备接口结果 0-成功 1-失败 --忽略';

COMMENT ON COLUMN "T_USER_BACK_THREAD_LOG"."MCMRESULT" IS '调用文档接口结果 0-成功 1-失败 --忽略';

COMMENT ON COLUMN "T_USER_BACK_THREAD_LOG"."WHITEBLACKRESULT" IS '调用黑白名单接口结果 0-成功 1-失败 --忽略';

COMMENT ON COLUMN "T_USER_BACK_THREAD_LOG"."PERMISSIONRESULT" IS '调用权限接口结果 0-成功 1-失败 --忽略';

COMMENT ON COLUMN "T_USER_BACK_THREAD_LOG"."LABELRESULT" IS '调用标签接口结果 0-成功 1-失败 --忽略';

COMMENT ON COLUMN "T_USER_BACK_THREAD_LOG"."REPORTRESULT" IS '调用报表接口结果 0-成功 1-失败 --忽略';

COMMENT ON COLUMN "T_USER_BACK_THREAD_LOG"."LOGINID" IS '操作账户';

COMMENT ON COLUMN "T_USER_BACK_THREAD_LOG"."STARTTIME" IS '操作开始时间';

COMMENT ON COLUMN "T_USER_BACK_THREAD_LOG"."ENDTIME" IS '操作结束时间';

COMMENT ON COLUMN "T_USER_APP_PERMISSION"."PKGNAME" IS '应用的包名';

COMMENT ON COLUMN "T_USER_APP_PERMISSION"."APP_USERNAME" IS '名称';

COMMENT ON COLUMN "T_USER_APP_PERMISSION"."USERID" IS '用户ID';

COMMENT ON COLUMN "T_USER_APP_PERMISSION"."PERMISSION" IS '-1-未开通 0-禁用 1-启用 ...';

COMMENT ON COLUMN "T_USER_APP_PERMISSION"."USER_APP_EXTRA_ID" IS '附加表t_user_app_extra的id(暂时不引入该表)';

COMMENT ON COLUMN "T_USER_APP_PERMISSION"."RESERVED_STRING" IS '保留字符型字段';

COMMENT ON COLUMN "T_USER_APP_PERMISSION"."RESERVED_STRING2" IS '保留字符型字段2';

COMMENT ON COLUMN "T_USER_APP_PERMISSION"."RESERVED_LONG" IS '保留整形字段';

CREATE INDEX "T_USER_GUID_INDEX"
ON "T_USER"("GUID");

CREATE INDEX "IDX_T_USER_GROUPID"
ON "T_USER"("GROUPID");

CREATE INDEX "LOGINID_INDEX"
ON "T_USER"("LOGINID");

COMMENT ON TABLE "T_USER" IS '设备用户表';

COMMENT ON COLUMN "T_USER"."LOGINID" IS '用户名';

COMMENT ON COLUMN "T_USER"."PASSWORD" IS '登录密码';

COMMENT ON COLUMN "T_USER"."NAME" IS '姓名';

COMMENT ON COLUMN "T_USER"."MAIL" IS '邮件地址';

COMMENT ON COLUMN "T_USER"."MOBILE" IS '联系电话';

COMMENT ON COLUMN "T_USER"."TYPE" IS '用户来源 0-手工录入 1-文件导入 2-ad导入 3-ad同步';

COMMENT ON COLUMN "T_USER"."CANLOGINSELF" IS '是否可登录自服务平台 0-否 1-是';

COMMENT ON COLUMN "T_USER"."CANREGISTDEVICE" IS '是否能够进行设备注册0-否 1-是';

COMMENT ON COLUMN "T_USER"."CANELIMINATEDEVICE" IS '是否能够进行设备淘汰0-否 1-是';

COMMENT ON COLUMN "T_USER"."ALLOWACTIVATENUM" IS '允许激活的设备数量';

COMMENT ON COLUMN "T_USER"."AUTOSYNCONTACTSFLAG" IS '是否开启通讯录自动同步,0--否;1--是';

COMMENT ON COLUMN "T_USER"."CONFLICT" IS '0-不冲突   1-冲突';

COMMENT ON COLUMN "T_USER"."STATUS" IS '用户状态 1-有效 0-无效';

COMMENT ON COLUMN "T_USER"."CREATTIME" IS '创建时间';

COMMENT ON COLUMN "T_USER"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_USER"."ALLOWUNREGISTEREDACTIVATE" IS '是否允许未注册设备激活,0-否 1-是';

COMMENT ON COLUMN "T_USER"."ALLOWINCONSISTENTACTIVATE" IS '是否允许设备激活与设备注册时的信息不一致时激活,0-否 1-是';

COMMENT ON COLUMN "T_USER"."GUID" IS 'ad/ldap同步时的唯一标识';

COMMENT ON COLUMN "T_USER"."SYNCBACTCHNO" IS 'ladp自动同步批次号';

COMMENT ON COLUMN "T_USER"."GROUPID" IS '组id';

COMMENT ON COLUMN "T_USER"."FORCEMODIFYPWD" IS '强制初次登录修改密码 0-否 1-是';

COMMENT ON COLUMN "T_USER"."MAXPWDAGE" IS '用户密码有效期 0-永久';

COMMENT ON COLUMN "T_USER"."MAXFAILEDATTEMPTS" IS '用户密码输入尝试次数 0-不限';

COMMENT ON COLUMN "T_USER"."PWDSTARTTIME" IS '密码有效期计算的开始时间，即用户首次登陆或者修改密码时间';

COMMENT ON COLUMN "T_USER"."LOCKINTERVAL" IS '密码输入超过次数后锁定时长 -1 从组继承配置 0 永久锁定 N 锁定多少分钟';

COMMENT ON COLUMN "T_USER"."BEMAIL" IS 'bemail邮箱';

COMMENT ON COLUMN "T_USER"."PWDMODIFIED" IS '是否已强制密码修改 0-未修改 1-已修改';

COMMENT ON COLUMN "T_USER"."BMPERMISSION" IS '开通BeMail标识 -1-未初始化, 1-使用中, 0-已关闭';

COMMENT ON COLUMN "T_USER"."LDAPCONFIGID" IS '关联的LDAP配置';

COMMENT ON COLUMN "T_USER"."EMMLOGINAGAIN" IS '自服务是否修改密码 0-未修改 1-已修改';

COMMENT ON COLUMN "T_USER"."RESETPWD" IS '发送激活邀请时是否重置用户密码 0-否 1-是';

COMMENT ON COLUMN "T_USER"."NEEDLOCKPASSWD" IS '是否需要解锁密码,0-否 1-是';

COMMENT ON COLUMN "T_USER"."FORBIDUNLOAD" IS '是否防止卸载，0-否 1-是';

COMMENT ON COLUMN "T_USER"."PASSWORDSTRENGTH" IS '1：弱（可以是纯字母或数字，6-16位）、2：中等（至少包含字母数字，8-16位）、3：复杂（至少包含大小写的字母以及数字，8-16位）';

COMMENT ON COLUMN "T_USER"."CUSTOM1" IS '自定义1';

COMMENT ON COLUMN "T_USER"."CUSTOM2" IS '自定义2';

COMMENT ON COLUMN "T_USER"."CUSTOM3" IS '自定义3';

COMMENT ON COLUMN "T_USER"."CUSTOM4" IS '自定义4';

COMMENT ON COLUMN "T_USER"."CUSTOM5" IS '自定义5';

COMMENT ON COLUMN "T_USER"."LOCKOPER" IS '管理员对用户锁操作 0：锁定 1：解锁';

COMMENT ON COLUMN "T_USER"."ALLOWACTIVATE" IS '是否允许激活设备管理器,0--不激活;1--强制激活;2--按需激活';

COMMENT ON COLUMN "T_USER"."PLAINPASSWORD" IS '可逆登录密码';

COMMENT ON COLUMN "T_USER"."ALLOWLOGOUT" IS '允许客户端显示登出按钮，1表示允许显示，0不允许显示';

COMMENT ON COLUMN "T_USER"."SYNCFLAG" IS '是否上报成功  1-上报成功 2-上报失败';

COMMENT ON COLUMN "T_USER"."IDENTIFIER" IS '身份证号';

COMMENT ON COLUMN "T_USER"."POLICETYPE" IS '警种';

COMMENT ON COLUMN "T_USER"."OID" IS '第三方用户id';

COMMENT ON COLUMN "T_USER"."AVATAR" IS '用户头像';

COMMENT ON COLUMN "T_USER"."LOCATIONSTATUS" IS '定位状态：1启用，0禁用';

COMMENT ON COLUMN "T_USER"."GOOGLEUSERID" IS 'Google用户ID';

COMMENT ON COLUMN "T_USER"."GOOGLEUSERKIND" IS 'Google用户类型';

COMMENT ON COLUMN "T_USER"."GOOGLEUSERMANAGETYPE" IS 'google用户管理类型';

COMMENT ON COLUMN "T_USER"."GOOGLEUSERACCOUNTTYPE" IS 'google用户账户类型';

COMMENT ON COLUMN "T_USER"."GOOGLEUSERMAIL" IS 'Google用户邮箱';

COMMENT ON COLUMN "T_USER"."GOOGLEUSERIDENTIFIER" IS 'Google用户标识';

COMMENT ON COLUMN "T_USER"."GOOGLEUSERNAME" IS 'Google用户展示名称';

COMMENT ON COLUMN "T_USER"."GOOGLEUSERTYPE" IS 'Google用户类型码 0-不添加google帐户 1-用户帐户类型 2-设备帐户类型';

COMMENT ON COLUMN "T_USER"."GOOGLEDEVICETYPE" IS 'Googel android设备激活类型 0-deviceOwner 1-workProfile';

COMMENT ON COLUMN "T_USER"."SYNCCONNECTORID" IS 't_connector表中connector id';

CREATE INDEX "FENCEID"
ON "T_TIME_UNIT"("FENCEID");

COMMENT ON TABLE "T_TIME_UNIT" IS '时间单元表';

COMMENT ON COLUMN "T_TIME_UNIT"."ID" IS '自增主键';

COMMENT ON COLUMN "T_TIME_UNIT"."FENCEID" IS '围栏表外键';

COMMENT ON COLUMN "T_TIME_UNIT"."TYPE" IS '时间单元类型 1-每天，2-每周，3-工作日，4-特定日志';

COMMENT ON COLUMN "T_TIME_UNIT"."VALUE" IS '时间单元类型具体值';

COMMENT ON COLUMN "T_TIME_UNIT"."BEGINTIME" IS '开始时间';

COMMENT ON COLUMN "T_TIME_UNIT"."ENDTIME" IS '结束时间';

COMMENT ON COLUMN "T_TIME_UNIT"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_TIME_UNIT"."UPDATETIME" IS '变更时间';

COMMENT ON TABLE "T_TIME_FENCE_RECORD" IS '时间围栏记录';

COMMENT ON COLUMN "T_TIME_FENCE_RECORD"."UDID" IS '设备id';

COMMENT ON COLUMN "T_TIME_FENCE_RECORD"."POLICYID" IS '时间围栏策略id';

COMMENT ON COLUMN "T_TIME_FENCE_RECORD"."STATUS" IS '1:出围栏，2:进围栏';

COMMENT ON COLUMN "T_TIME_FENCE_RECORD"."SENDCMD" IS '判断在围栏外时是否发送过沙箱指令 0未发送，1已发送';

COMMENT ON TABLE "T_TEMP_DEVICE_IOS_CTRL" IS 'ios设备远程控制指令临时表';

COMMENT ON COLUMN "T_TEMP_DEVICE_IOS_CTRL"."UUID" IS '指令uuid';

COMMENT ON COLUMN "T_TEMP_DEVICE_IOS_CTRL"."OPERTYPE" IS '操作类型 0:锁机;21--清除密码;22--设备更新,23--设备定位,24--播放铃声,25--设备擦除,26--选择性擦除';

COMMENT ON COLUMN "T_TEMP_DEVICE_IOS_CTRL"."PARAMCONTENT" IS '指令参数';

COMMENT ON COLUMN "T_TEMP_DEVICE_IOS_CTRL"."CREATETIME" IS '指令下发时间';

COMMENT ON COLUMN "T_TEMP_DEVICE_IOS_CTRL"."RETRYTIME" IS '重试时间';

COMMENT ON COLUMN "T_TEMP_DEVICE_IOS_CTRL"."RETRYTIMES" IS '重试次数';

COMMENT ON COLUMN "T_TEMP_DEVICE_IOS_CTRL"."STATUS" IS '执行状态.0:指令下发未执行;1:执行成功;21--执行失败';

COMMENT ON TABLE "T_TAG_USER" IS '标签授权的用户关联表';

COMMENT ON COLUMN "T_TAG_USER"."ID" IS 'id';

COMMENT ON COLUMN "T_TAG_USER"."TAGID" IS '标签id';

COMMENT ON COLUMN "T_TAG_USER"."USERID" IS '用户id';

COMMENT ON COLUMN "T_TAG_USER"."CUSTOMFLAG" IS '自定义标识: 0-继承 ;1-自定义';

COMMENT ON COLUMN "T_TAG_USER"."EXCEPTIONFLAG" IS '例外标识: 0-添加 ;1-排除';

COMMENT ON TABLE "T_TAG_TIME" IS '时间标签关联表';

COMMENT ON COLUMN "T_TAG_TIME"."ID" IS 'id';

COMMENT ON COLUMN "T_TAG_TIME"."TAGID" IS '时间标签id';

COMMENT ON COLUMN "T_TAG_TIME"."MINDATETIME" IS '时间标签的开始值';

COMMENT ON COLUMN "T_TAG_TIME"."MAXDATETIME" IS '时间标签的结束值';

COMMENT ON TABLE "T_TAG_POSITION" IS '位置标签关联表';

COMMENT ON COLUMN "T_TAG_POSITION"."ID" IS 'id';

COMMENT ON COLUMN "T_TAG_POSITION"."TAGID" IS '位置标签id';

COMMENT ON COLUMN "T_TAG_POSITION"."MINLONGITUDE" IS '位置标签的最小经度值';

COMMENT ON COLUMN "T_TAG_POSITION"."MINLATITUDE" IS '位置标签的最小纬度值';

COMMENT ON COLUMN "T_TAG_POSITION"."MAXLONGITUDE" IS '位置标签的最大经度值';

COMMENT ON COLUMN "T_TAG_POSITION"."MAXLATITUDE" IS '位置标签的最大纬度值';

COMMENT ON TABLE "T_TAG_GROUP" IS '标签授权的用户组关联表';

COMMENT ON COLUMN "T_TAG_GROUP"."ID" IS 'id';

COMMENT ON COLUMN "T_TAG_GROUP"."TAGID" IS '标签id';

COMMENT ON COLUMN "T_TAG_GROUP"."GROUPID" IS '用户组id';

COMMENT ON COLUMN "T_TAG_GROUP"."CUSTOMFLAG" IS '自定义标识: 0-继承 ;1-自定义';

COMMENT ON COLUMN "T_TAG_GROUP"."EXCEPTIONFLAG" IS '例外标识: 0-添加 ;1-排除';

COMMENT ON TABLE "T_TAG" IS '标签信息表';

COMMENT ON COLUMN "T_TAG"."ID" IS '标签id';

COMMENT ON COLUMN "T_TAG"."TAGNAME" IS '标签名称';

COMMENT ON COLUMN "T_TAG"."TAGTYPE" IS '标签类型: 0 用户标签  , 1 时间标签   , 2 位置标签';

COMMENT ON COLUMN "T_TAG"."STATUS" IS '标签状态: 0 禁用   , 1 启用';

COMMENT ON COLUMN "T_TAG"."DESCRIPTION" IS '描述';

COMMENT ON COLUMN "T_TAG"."ISDEFAULT" IS '是否是系统默认标签: 0  否  , 1  是';

COMMENT ON COLUMN "T_TAG"."ISALLUSER" IS '是否为全部用户标签: 0 否  , 1 是';

COMMENT ON COLUMN "T_TAG"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_TAG"."UPDATETIME" IS '修改时间';

COMMENT ON COLUMN "T_TAG"."CREATEBY" IS '创建人';

COMMENT ON COLUMN "T_TAG"."UPDATEBY" IS '修改人';

CREATE INDEX "ROLEID"
ON "T_SYS_USER_ROLE"("ROLEID");

CREATE INDEX "LOGINID"
ON "T_SYS_USER_ROLE"("LOGINID");

COMMENT ON TABLE "T_SYS_USER_ROLE" IS '系统用户角色表';

COMMENT ON COLUMN "T_SYS_USER_ROLE"."LOGINID" IS '用户名';

COMMENT ON COLUMN "T_SYS_USER_ROLE"."ROLEID" IS '角色id';

COMMENT ON TABLE "T_SYS_USER_PERM" IS '管理员权限表';

COMMENT ON COLUMN "T_SYS_USER_PERM"."LOGINID" IS '管理员标识';

COMMENT ON COLUMN "T_SYS_USER_PERM"."CODE" IS '菜单编号';

COMMENT ON COLUMN "T_SYS_USER_PERM"."AUTHORITY" IS '菜单对应的权限 0-查询 1-管理';

COMMENT ON TABLE "T_SYS_USER_GROUP" IS '管理员组关联表';

COMMENT ON COLUMN "T_SYS_USER_GROUP"."LOGINID" IS '管理员标识';

COMMENT ON COLUMN "T_SYS_USER_GROUP"."GROUPID" IS '组标识';

CREATE INDEX "PARENTID_INDEX"
ON "T_SYS_USER"("PARENTID");

COMMENT ON TABLE "T_SYS_USER" IS '系统用户表';

COMMENT ON COLUMN "T_SYS_USER"."LOGINID" IS '用户名';

COMMENT ON COLUMN "T_SYS_USER"."PASSWORD" IS '密码';

COMMENT ON COLUMN "T_SYS_USER"."NAME" IS '真实姓名';

COMMENT ON COLUMN "T_SYS_USER"."TELEPHONE" IS '电话';

COMMENT ON COLUMN "T_SYS_USER"."EMAIL" IS '电子信箱';

COMMENT ON COLUMN "T_SYS_USER"."DESCRIPTION" IS '描述';

COMMENT ON COLUMN "T_SYS_USER"."FLAG" IS '系统用户标识,10--超级管理员,20--管理员,21--业务管理员 11--审核员';

COMMENT ON COLUMN "T_SYS_USER"."PARENTID" IS '父管理员id';

COMMENT ON COLUMN "T_SYS_USER"."NEEDCHANGEPWD" IS '登录后是否需要修改密码依据 0-否 1-是';

COMMENT ON COLUMN "T_SYS_USER"."SYNCCONNECTORID" IS 't_connector表中connector id';

COMMENT ON COLUMN "T_SYS_USER"."SYNCBATCHNO" IS 'connector同步批次号';

COMMENT ON COLUMN "T_SYS_USER"."SYNCUID" IS '同步connector的第三方账户uid';

COMMENT ON COLUMN "T_SYS_USER"."ROLES" IS '角色ID，以逗号分隔';

CREATE INDEX "CODE"
ON "T_SYS_ROLE_MENU"("CODE");

COMMENT ON COLUMN "T_SYS_ROLE_MENU"."ROLEID" IS '角色id';

COMMENT ON COLUMN "T_SYS_ROLE_MENU"."CODE" IS '菜单编号';

COMMENT ON COLUMN "T_SYS_ROLE_MENU"."AUTHORITY" IS '权限 0-查询 1-管理';

COMMENT ON TABLE "T_SYS_ROLE" IS '系统角色表';

COMMENT ON COLUMN "T_SYS_ROLE"."NAME" IS '角色名称';

COMMENT ON COLUMN "T_SYS_ROLE"."DESCRIPTION" IS '描述';

COMMENT ON COLUMN "T_SYS_ROLE"."SYSFLAG" IS '是否系统内置 0-否 1-是';

COMMENT ON COLUMN "T_SYS_MENU"."CODE" IS '菜单编号';

COMMENT ON COLUMN "T_SYS_MENU"."PARENTCODE" IS '父菜单编号';

COMMENT ON COLUMN "T_SYS_MENU"."TYPE" IS '类型,1--菜单子节点;0--菜单叶节点';

COMMENT ON COLUMN "T_SYS_MENU"."MENULEVEL" IS '层级';

COMMENT ON COLUMN "T_SYS_MENU"."TITLE" IS '标题';

COMMENT ON COLUMN "T_SYS_MENU"."ROOTPATH" IS '模块根路径';

COMMENT ON COLUMN "T_SYS_MENU"."URL" IS 'url';

COMMENT ON COLUMN "T_SYS_LOG"."USERID" IS '用户id';

COMMENT ON COLUMN "T_SYS_LOG"."LOGINID" IS '用户名';

COMMENT ON COLUMN "T_SYS_LOG"."NAME" IS '真实姓名';

COMMENT ON COLUMN "T_SYS_LOG"."IP" IS 'ip地址';

COMMENT ON COLUMN "T_SYS_LOG"."CATEGORY" IS '日志分类：1-设备；2-用户；3-应用；4-登录；5-内容 ';

COMMENT ON COLUMN "T_SYS_LOG"."OPERTYPE" IS '操作类型';

COMMENT ON COLUMN "T_SYS_LOG"."OPERTIME" IS '操作时间';

COMMENT ON COLUMN "T_SYS_LOG"."OPERDESC" IS '操作描述';

COMMENT ON COLUMN "T_SYS_LOG"."OPTLEVEL" IS '严重程度';

COMMENT ON COLUMN "T_SYS_LOG"."OPTAFFECTED" IS '影响谁/事';

COMMENT ON COLUMN "T_SYS_LOG"."OPTCONTENT" IS '日志数据';

COMMENT ON COLUMN "T_SYS_LOG"."OPTIDS" IS '影响的设备id列表';

COMMENT ON TABLE "T_SYS_DICTIONARY_VALUE" IS '字典值表';

COMMENT ON COLUMN "T_SYS_DICTIONARY_VALUE"."STATUS" IS '启用禁用  1:启用 0:禁用';

COMMENT ON COLUMN "T_SYS_DICTIONARY_VALUE"."DICTTYPE" IS '关联t_sys_dictionary';

COMMENT ON COLUMN "T_SYS_DICTIONARY_VALUE"."FROMTYPE" IS '数据来源 1:预置数据 2:管理员添加 ';

COMMENT ON COLUMN "T_SYS_DICTIONARY_VALUE"."PWDSEND" IS '1:下发密码 2:不下发密码';

COMMENT ON TABLE "T_SYS_DICTIONARY" IS '系统字典表,系统版本、运营商、手机品牌 ';

COMMENT ON TABLE "T_SYSCONF_SETLICENSE" IS '浏览器黑名单and例外配置与策略关联表';

COMMENT ON COLUMN "T_SYSCONF_SETLICENSE"."ID" IS 'uuid';

COMMENT ON COLUMN "T_SYSCONF_SETLICENSE"."ISSUEDATE" IS '颁发日期';

COMMENT ON COLUMN "T_SYSCONF_SETLICENSE"."EXPIREDATE" IS '截止日期';

COMMENT ON COLUMN "T_SYSCONF_SETLICENSE"."LICENSEVALUE" IS '实际License';

COMMENT ON COLUMN "T_SYSCONF_SETLICENSE"."MAXUSERCOUNTS" IS '可用的最大用户数';

COMMENT ON COLUMN "T_SYSCONF_SETLICENSE"."USEDCOUNTS" IS '已用的License数';

COMMENT ON COLUMN "T_SYSCONF_SETLICENSE"."LICENSETYPE" IS '暂时只有KNOX,SAFE两种,默认值为0；0表示SAFE，1表示KNOX';

COMMENT ON COLUMN "T_SYSCONF_SETLICENSE"."USERID" IS '用户ID';

COMMENT ON COLUMN "T_SYSCONF_SETLICENSE"."GROUPID" IS '组ID';

CREATE INDEX "T_STATIC_LABEL_IBFK_2_IDX"
ON "T_STATIC_LABEL_USER"("USERID");

COMMENT ON TABLE "T_STATIC_LABEL_USER" IS '静态标签用户表';

COMMENT ON COLUMN "T_STATIC_LABEL_USER"."ID" IS 'uuid';

COMMENT ON COLUMN "T_STATIC_LABEL_USER"."LABELID" IS '标签id';

COMMENT ON COLUMN "T_STATIC_LABEL_USER"."USERID" IS '用户id';

COMMENT ON TABLE "T_SERVER" IS 'server 表, 用于存储其他server在BeMail Console中的注册信息';

COMMENT ON COLUMN "T_SERVER"."ID" IS '主键';

COMMENT ON COLUMN "T_SERVER"."NAME" IS '名称';

COMMENT ON COLUMN "T_SERVER"."VERSION" IS '版本';

COMMENT ON COLUMN "T_SERVER"."TYPE" IS '类型 BMNS - BeMail Notification Server';

COMMENT ON COLUMN "T_SERVER"."URL" IS 'RESTful Base URL';

COMMENT ON COLUMN "T_SERVER"."AUTHTOKEN" IS '回调Server URL的Auth Token';

COMMENT ON COLUMN "T_SERVER"."BCAUTHTOKEN" IS '访问BeMail Console的Auth Token';

COMMENT ON COLUMN "T_SERVER"."LASTCHECKTIMESTAMP" IS 'Server上一次响应的时间戳';

COMMENT ON COLUMN "T_SERVER"."CREATEDDATETIME" IS '创建时间';

COMMENT ON COLUMN "T_SERVER"."UPDATEDDATETIME" IS '修改时间';

CREATE INDEX "UUID"
ON "T_RESTRICTIONS_SAMSUNG"("UUID");

COMMENT ON TABLE "T_RESTRICTIONS_SAMSUNG" IS 'safe设备(samsung)限制策略';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ID" IS 'uuid';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ALLOWAPPFROMWHITELISTUNINSTALL" IS '允许删除企业应用（应用商店中的必装应用） 0-不允许；1-允许';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ALLOWBLUETOOTH" IS '是否启用蓝牙 0-不启用；1-启用';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ALLOWCAMERA" IS '是否启用相机 0-不启用；1-启用';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ALLOWMICROPHONE" IS '是否启用麦克风 0-不启用；1-启用';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ALLOWWIFI" IS '启用wifi 0-不启用；1-启用';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ALLOWNFC" IS '是否启用nfc 0-不启用；1-启用';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ALLOWMOCKLOCATION" IS '是否启用gps 0-不启用；1-启用';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ALLOWSDCARD" IS '是否启用sd卡 0-不启用；1-启用';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ALLOWUSB" IS 'usb连接 0-不启用；1-启用';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ALLOWVPN" IS '允许vpn 0-不启用；1-启用';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ALLOWOTAUPGRADE" IS '允许os升级 0-不启用；1-启用';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ALLOW3GDATA" IS '允许3g数据 0-不启用；1-启用';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ALLOWSETTINGSCHANGES" IS '是否允许访问“设置”选项 0-不启用；1-启用';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ALLOWBROWSER" IS '允许使用原生浏览器 0-不启用；1-启用';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ALLOWROAMINGVOICECALLS" IS '允许语音漫游 0-不启用；1-启用';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ALLOWROAMINGDATA" IS '允许数据漫游 0-不启用；1-启用';

COMMENT ON COLUMN "T_RESTRICTIONS_SAMSUNG"."ALLOWROAMINGMSG" IS '允许发送短信 0-不启用；1-启用';

COMMENT ON TABLE "T_RESET_PASSWORD" IS '密码重置表';

COMMENT ON COLUMN "T_RESET_PASSWORD"."USERID" IS '用户id';

COMMENT ON COLUMN "T_RESET_PASSWORD"."TOKEN" IS '重置密码token';

COMMENT ON COLUMN "T_RESET_PASSWORD"."STATUS" IS '链接是否有效 1-有效 0-无效 -1-删除';

COMMENT ON COLUMN "T_RESET_PASSWORD"."CREATTIME" IS '创建时间';

COMMENT ON COLUMN "T_RESET_PASSWORD"."UPDATETIME" IS '更新时间';

CREATE INDEX "SUBSID"
ON "T_REPORT_SUBS_PARAM"("SUBSID");

COMMENT ON TABLE "T_REPORT_SUBS_PARAM" IS '报表订阅之报表参数表';

COMMENT ON COLUMN "T_REPORT_SUBS_PARAM"."ID" IS 'uuid';

COMMENT ON COLUMN "T_REPORT_SUBS_PARAM"."SUBSID" IS '订阅id';

COMMENT ON COLUMN "T_REPORT_SUBS_PARAM"."REPORTID" IS '报表id';

COMMENT ON COLUMN "T_REPORT_SUBS_PARAM"."PARAMNAME" IS '参数名';

COMMENT ON COLUMN "T_REPORT_SUBS_PARAM"."PARAMVALUE" IS '参数数值';

CREATE INDEX "REPORTID"
ON "T_REPORT_SUBSCRIPTION"("REPORTID");

COMMENT ON TABLE "T_REPORT_SUBSCRIPTION" IS '报表订阅表';

COMMENT ON COLUMN "T_REPORT_SUBSCRIPTION"."ID" IS 'uuid';

COMMENT ON COLUMN "T_REPORT_SUBSCRIPTION"."REPORTID" IS '报表id';

COMMENT ON COLUMN "T_REPORT_SUBSCRIPTION"."CREATER" IS '订阅创建人';

COMMENT ON COLUMN "T_REPORT_SUBSCRIPTION"."SUBSNAME" IS '订阅名称';

COMMENT ON COLUMN "T_REPORT_SUBSCRIPTION"."REPORTDOCTYPE" IS '报表文档类型,0--excel;1--pdf';

COMMENT ON COLUMN "T_REPORT_SUBSCRIPTION"."INCOMINGMAIL" IS '接收邮件地址';

COMMENT ON COLUMN "T_REPORT_SUBSCRIPTION"."CYCLETYPE" IS '订阅周期类型,0--日报;1--周报;2--月报';

COMMENT ON COLUMN "T_REPORT_SUBSCRIPTION"."REPORTCYCLE" IS '报表周期，0:关注所有；1：关注本期';

COMMENT ON COLUMN "T_REPORT_SUBSCRIPTION"."SUBSTIME" IS '订阅的时间,日报时间如hh:mm;周报为本周周几;月报为本月第几天';

COMMENT ON COLUMN "T_REPORT_SUBSCRIPTION"."DESCRIPTION" IS '订阅描述';

COMMENT ON COLUMN "T_REPORT_SUBSCRIPTION"."LASTEXETIME" IS '上次执行时间';

COMMENT ON COLUMN "T_REPORT_SUBSCRIPTION"."LASTEXESTATUS" IS '上次执行状态,0--成功;-1--失败';

COMMENT ON COLUMN "T_REPORT_SUBSCRIPTION"."FILEPATH" IS '报表文档路径';

COMMENT ON TABLE "T_REPORT_SCHEDULE" IS '报表订阅排程表';

COMMENT ON COLUMN "T_REPORT_SCHEDULE"."ID" IS 'uuid';

COMMENT ON COLUMN "T_REPORT_SCHEDULE"."SUBSID" IS '订阅id';

COMMENT ON COLUMN "T_REPORT_SCHEDULE"."REPORTID" IS '报表id';

COMMENT ON COLUMN "T_REPORT_SCHEDULE"."JOBNAME" IS 'job name';

COMMENT ON COLUMN "T_REPORT_SCHEDULE"."JOBGROUP" IS 'job group';

COMMENT ON COLUMN "T_REPORT_SCHEDULE"."TRIGGERNAME" IS 'trigger name';

COMMENT ON COLUMN "T_REPORT_SCHEDULE"."TRIGGERGROUP" IS 'trigger group';

COMMENT ON COLUMN "T_REPORT_SCHEDULE"."CRONEXPRESSION" IS 'cron表达式';

COMMENT ON TABLE "T_REPORT_CHATS_FILE" IS '聊天日志文件报表';

COMMENT ON COLUMN "T_REPORT_CHATS_FILE"."ID" IS 'id';

COMMENT ON COLUMN "T_REPORT_CHATS_FILE"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_REPORT_CHATS_FILE"."USERID" IS '用户id';

COMMENT ON COLUMN "T_REPORT_CHATS_FILE"."APPID" IS 'APP id';

COMMENT ON COLUMN "T_REPORT_CHATS_FILE"."APPPKG" IS 'app package name';

COMMENT ON COLUMN "T_REPORT_CHATS_FILE"."APPNAME" IS 'app name';

COMMENT ON COLUMN "T_REPORT_CHATS_FILE"."CHATSTYPE" IS '信息类型';

COMMENT ON COLUMN "T_REPORT_CHATS_FILE"."FILEPATH" IS '日志路径';

COMMENT ON COLUMN "T_REPORT_CHATS_FILE"."ORIGINFILENAME" IS '文件名';

COMMENT ON COLUMN "T_REPORT_CHATS_FILE"."FILETYPE" IS '文件类型';

COMMENT ON COLUMN "T_REPORT_CHATS_FILE"."FILESIZE" IS '文件大小';

COMMENT ON COLUMN "T_REPORT_CHATS_FILE"."COLLECTIONTIME" IS '日志收集时间';

COMMENT ON COLUMN "T_REPORT_CHATS_FILE"."REPORTTIME" IS '上报时间';

COMMENT ON COLUMN "T_REPORT_CHATS_FILE"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_REPORT_CHATS_FILE"."AUDITTYPE" IS '1:聊天审计日志 2:网页发帖搜索日志';

COMMENT ON COLUMN "T_REPORT_CHATS_FILE"."ACCOUNT" IS '微信账号';

COMMENT ON COLUMN "T_REPORT_CHATS_FILE"."VERSION" IS '版本';

COMMENT ON TABLE "T_REPORT_CHATS_CONTENT" IS '聊天内容报表';

COMMENT ON COLUMN "T_REPORT_CHATS_CONTENT"."ID" IS 'id';

COMMENT ON COLUMN "T_REPORT_CHATS_CONTENT"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_REPORT_CHATS_CONTENT"."USERID" IS '用户id';

COMMENT ON COLUMN "T_REPORT_CHATS_CONTENT"."APPID" IS 'APP id';

COMMENT ON COLUMN "T_REPORT_CHATS_CONTENT"."APPPKG" IS 'app package name';

COMMENT ON COLUMN "T_REPORT_CHATS_CONTENT"."APPNAME" IS 'app name';

COMMENT ON COLUMN "T_REPORT_CHATS_CONTENT"."MSGTYPE" IS '1发送，0接受';

COMMENT ON COLUMN "T_REPORT_CHATS_CONTENT"."CONTACTS" IS '联系人';

COMMENT ON COLUMN "T_REPORT_CHATS_CONTENT"."KEYWORD" IS '关键字';

COMMENT ON COLUMN "T_REPORT_CHATS_CONTENT"."CHATCONTENT" IS '聊天内容';

COMMENT ON COLUMN "T_REPORT_CHATS_CONTENT"."OCCURREDTIME" IS '聊天发生时间';

COMMENT ON COLUMN "T_REPORT_CHATS_CONTENT"."COLLECTIONTIME" IS '收集时间';

COMMENT ON COLUMN "T_REPORT_CHATS_CONTENT"."REPORTTIME" IS '上报时间';

COMMENT ON COLUMN "T_REPORT_CHATS_CONTENT"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_REPORT_CHATS_CONTENT"."CONTENTTYPE" IS '1:聊天审计日志 2:网页关键字过滤日志';

COMMENT ON COLUMN "T_REPORT_CHATS_CONTENT"."UPDATESTATUS" IS '更新状态(0：未更新，1：已更新)';

COMMENT ON TABLE "T_REPORT" IS '报表表';

COMMENT ON COLUMN "T_REPORT"."ID" IS 'uuid';

COMMENT ON COLUMN "T_REPORT"."REPORTNAME" IS '报表名称';

COMMENT ON COLUMN "T_REPORT"."REPORTTYPE" IS '报表类别';

COMMENT ON COLUMN "T_REPORT"."DESCRIPTION" IS '报表描述';

COMMENT ON TABLE "T_REMOTE_DESKTOP_LOG" IS '设备远程控制指令表';

COMMENT ON COLUMN "T_REMOTE_DESKTOP_LOG"."UUID" IS '指令uuid';

COMMENT ON COLUMN "T_REMOTE_DESKTOP_LOG"."CREATETIME" IS '指令下发时间';

COMMENT ON COLUMN "T_REMOTE_DESKTOP_LOG"."UPDATETIME" IS '执行完成更新时间';

COMMENT ON COLUMN "T_REMOTE_DESKTOP_LOG"."STATUS" IS '执行状态,0：结果未上报1：成功2：RC APP未安装3：RC APP启动失败4：用户授权拒绝5：用户拒绝6：连接RC服务器失败7：连接已占用';

CREATE INDEX "IDX_T_PUSH_INFO_UDID"
ON "T_PUSH_INFO"("UDID");

COMMENT ON COLUMN "T_PUSH_INFO"."ID" IS '主键id，自增长';

COMMENT ON COLUMN "T_PUSH_INFO"."UDID" IS '设备udid';

COMMENT ON COLUMN "T_PUSH_INFO"."UUID" IS 'uuid';

COMMENT ON COLUMN "T_PUSH_INFO"."STATUS" IS '0-未读，1-已读，10-已删除';

COMMENT ON COLUMN "T_PUSH_INFO"."SOURCE" IS '消息来源,0-mdm,1-mcm,2-platform,...';

COMMENT ON COLUMN "T_PUSH_INFO"."CONTENT" IS '消息内容';

COMMENT ON COLUMN "T_PUSH_INFO"."RESOURCEURI" IS '资源uri';

COMMENT ON COLUMN "T_PUSH_INFO"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_PUSH_INFO"."UPDATETIME" IS '上次更新时间';

COMMENT ON COLUMN "T_PUSH_INFO"."DOMAINTYPE" IS '是否企业域应用：0否 1是 默认0';

COMMENT ON COLUMN "T_PUSH_INFO"."INFOTYPE" IS '0: 系统消息  1：手工通知消息';

COMMENT ON COLUMN "T_PUSH_INFO"."USERID" IS '用户id';

CREATE INDEX "POLICYID"
ON "T_POLICY_USER"("POLICYID");

COMMENT ON COLUMN "T_POLICY_USER"."POLICYID" IS '策略id';

COMMENT ON COLUMN "T_POLICY_USER"."USERID" IS '用户id';

COMMENT ON COLUMN "T_POLICY_USER"."CUSTOMFLAG" IS '自定义标识: 0-继承 ;1-自定义';

COMMENT ON COLUMN "T_POLICY_USER"."EXCEPTIONFLAG" IS '例外标识: 0-添加 ;1-排除';

COMMENT ON COLUMN "T_POLICY_SCEP"."ID" IS 'uuid';

COMMENT ON COLUMN "T_POLICY_SCEP"."PAYLOADIDENTIFIER" IS '标识符';

COMMENT ON COLUMN "T_POLICY_SCEP"."URL" IS '服务器url';

COMMENT ON COLUMN "T_POLICY_SCEP"."NAME" IS '名称';

COMMENT ON COLUMN "T_POLICY_SCEP"."SUBJECT" IS '主题';

COMMENT ON COLUMN "T_POLICY_SCEP"."CHALLENGE" IS '口令';

COMMENT ON COLUMN "T_POLICY_SCEP"."KEYTYPE" IS 'currently always rsa';

COMMENT ON COLUMN "T_POLICY_SCEP"."KEYUSAGE" IS '用做数字签名(1),用于密匙加密(4)';

COMMENT ON COLUMN "T_POLICY_SCEP"."SUBJECTALTNAMETYPE" IS '主题备用名称类型   0--无,1--rfc 822 name,2--dns 名称,3--统一资源标识符';

COMMENT ON COLUMN "T_POLICY_SCEP"."NTPRINCIPALNAME" IS 'nt 主题名称 ';

COMMENT ON COLUMN "T_POLICY_SCEP"."RFC822NAME" IS '主题备用名称值(主题备用名称类型  为1--rfc 822 name)';

COMMENT ON COLUMN "T_POLICY_SCEP"."DNSNAME" IS '主题备用名称值(主题备用名称类型 为2--dns 名称)';

COMMENT ON COLUMN "T_POLICY_SCEP"."UNIFORMRESOURCEIDENTIFIER" IS '主题备用名称值(主题备用名称类型 为3--统一资源标识符)';

COMMENT ON COLUMN "T_POLICY_SCEP"."CAFINGERPRINT" IS '指纹';

COMMENT ON COLUMN "T_POLICY_SCEP"."CAFINGERPRINTSHA1" IS '指纹sha-1显示值';

COMMENT ON COLUMN "T_POLICY_SCEP"."RETRIES" IS '重试次数';

COMMENT ON COLUMN "T_POLICY_SCEP"."RETRYDELAY" IS 'retrydelay,重试间隔时间(秒)';

COMMENT ON COLUMN "T_POLICY_SCEP"."KEYSIZE" IS '密匙大小(位)';

CREATE INDEX "IDX_POLICY_ID_PUSH"
ON "T_POLICY_PUSH"("POLICYID");

COMMENT ON TABLE "T_POLICY_PUSH" IS '策略推送表';

COMMENT ON COLUMN "T_POLICY_PUSH"."ID" IS '推送id';

COMMENT ON COLUMN "T_POLICY_PUSH"."POLICYID" IS '策略id';

COMMENT ON COLUMN "T_POLICY_PUSH"."RELATIONSHIP" IS '推送设备所属关系：0-全部；1-公司；2-员工；3-其他';

COMMENT ON COLUMN "T_POLICY_PUSH"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_POLICY_PUSH"."APPTYPE" IS '应用类型';

COMMENT ON COLUMN "T_POLICY_MDM"."ID" IS 'uuid';

COMMENT ON COLUMN "T_POLICY_MDM"."PAYLOADIDENTIFIER" IS '标识符';

COMMENT ON COLUMN "T_POLICY_MDM"."SERVERURL" IS '服务器url';

COMMENT ON COLUMN "T_POLICY_MDM"."CHECKINURL" IS '登记url';

COMMENT ON COLUMN "T_POLICY_MDM"."TOPIC" IS '主题';

COMMENT ON COLUMN "T_POLICY_MDM"."IDENTITYCERTIFICATEUUID" IS '身份';

COMMENT ON COLUMN "T_POLICY_MDM"."SIGNMESSAGE" IS '给信息签名 0-false;1-true';

COMMENT ON COLUMN "T_POLICY_MDM"."CHECKOUTWHENREMOVED" IS '移除时检查 0-false;1-true';

COMMENT ON COLUMN "T_POLICY_MDM"."USEDEVELOPMENTAPNS" IS '使用开发apns服务器 0-false;1-true';

COMMENT ON COLUMN "T_POLICY_MDM"."ACCESSRIGHTS" IS '访问权限选项全选，包括"在设备中查询"、"添加/移除"、安全性';

COMMENT ON COLUMN "T_POLICY_LOG"."ID" IS 'uuid';

COMMENT ON COLUMN "T_POLICY_LOG"."PAYLOADDISPLAYNAME" IS '名称';

COMMENT ON COLUMN "T_POLICY_LOG"."POLICYID" IS '描述';

COMMENT ON COLUMN "T_POLICY_LOG"."LOGINID" IS '创建人';

COMMENT ON COLUMN "T_POLICY_LOG"."CREATOR" IS '创建人姓名';

COMMENT ON COLUMN "T_POLICY_LOG"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_POLICY_LOG"."STATUS" IS '策略状态,-1--删除;0--禁用;1--启用';

COMMENT ON COLUMN "T_POLICY_LOG"."TYPE" IS '默认为0 5-Android限制策略 6-IOS限制策略 7-KNOX限制策略 8-SAFE 限制策略 9-Android配置策略 10-IOS配置策略 11-KNOX配置策略 12-SAFE配置策略 13-Android时间围栏策略 14-IOS时间围栏策略 15-Android地理围栏策略 16-IOS地理围栏策略 17-华为限制策略';

COMMENT ON COLUMN "T_POLICY_LOG"."EXTENSIONJSON" IS '扩展存放json';

COMMENT ON COLUMN "T_POLICY_LOG"."ORIGINJSON" IS '传入原始参数json';

COMMENT ON COLUMN "T_POLICY_LOG"."UPDATETYPE" IS '操作类型';

COMMENT ON COLUMN "T_POLICY_GROUP"."POLICYID" IS '策略id';

COMMENT ON COLUMN "T_POLICY_GROUP"."CUSTOMFLAG" IS '自定义标识: 0-继承 ;1-自定义';

CREATE INDEX "GROFK_T_POLICY_FENCEID_T_FENCEUPID"
ON "T_POLICY"("FENCEID");

COMMENT ON COLUMN "T_POLICY"."ID" IS 'uuid';

COMMENT ON COLUMN "T_POLICY"."PAYLOADDISPLAYNAME" IS '名称';

COMMENT ON COLUMN "T_POLICY"."PAYLOADIDENTIFIER" IS '标识符';

COMMENT ON COLUMN "T_POLICY"."PAYLOADORGANIZATION" IS '机构';

COMMENT ON COLUMN "T_POLICY"."PAYLOADDESCRIPTION" IS '描述';

COMMENT ON COLUMN "T_POLICY"."PAYLOADREMOVALTYPE" IS '安全性      总是--0;鉴定--1;永不--2';

COMMENT ON COLUMN "T_POLICY"."REMOVALPASSWORD" IS '授权密码';

COMMENT ON COLUMN "T_POLICY"."LOGINID" IS '创建人';

COMMENT ON COLUMN "T_POLICY"."CREATOR" IS '创建人姓名';

COMMENT ON COLUMN "T_POLICY"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_POLICY"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_POLICY"."STATUS" IS '策略状态,-1--删除;0--禁用;1--启用';

COMMENT ON COLUMN "T_POLICY"."TYPE" IS '默认为0 5-Android限制策略 6-IOS限制策略 7-KNOX限制策略 8-SAFE 限制策略 9-Android配置策略 10-IOS配置策略 11-KNOX配置策略 12-SAFE配置策略 13-Android时间围栏策略 14-IOS时间围栏策略 15-Android地理围栏策略 16-IOS地理围栏策略 17-华为限制策略';

COMMENT ON COLUMN "T_POLICY"."FENCEID" IS '关联的围栏ID';

COMMENT ON COLUMN "T_POLICY"."PRIORITY" IS '策略优先级';

COMMENT ON COLUMN "T_POLICY"."PLATFORMTYPE" IS '适用平台 1--android;2--ios';

COMMENT ON COLUMN "T_POLICY"."POLICYTYPE" IS '策略类型,0--自定义;10--内置默认;11--默认可修改';

COMMENT ON COLUMN "T_POLICY"."MINVERSION" IS '最低操作系统版本,如:5.0.0(ios),''''--任意';

COMMENT ON COLUMN "T_POLICY"."DEVICETYPE" IS '设备类型 10-android phone 11-android pad;20-iphone 21-ipad 22-ipadmini 23- ipodtouch';

COMMENT ON COLUMN "T_POLICY"."ISSUEDOBJECTFLAG" IS '分发对象标识  0--自定义;1--所有员工';

COMMENT ON COLUMN "T_POLICY"."RELATIONSHIP" IS '设备所属关系  1--公司设备;2--员工设备;3--其他,多种关系使用逗号分隔';

COMMENT ON COLUMN "T_POLICY"."OWNERID" IS '管理者id';

COMMENT ON COLUMN "T_POLICY"."EXTENSIONJSON" IS '扩展存放json';

COMMENT ON COLUMN "T_POLICY"."POLICYPUSHTIME" IS '策略推送时间';

COMMENT ON COLUMN "T_POLICY"."DELETEDELAYTIME" IS '延迟删除时间';

COMMENT ON COLUMN "T_POLICY"."SPECIALTYPEFLAG" IS '策略适用的特殊设备类型标识.0--普通设备;100--SamSung SAFE设备;101--SamSung KNOX设备;301--华为设备';

COMMENT ON COLUMN "T_POLICY"."CMDS" IS '命令码集合';

COMMENT ON COLUMN "T_POLICY"."DISTTYPE" IS '0-用户／用户组 1-标签';

COMMENT ON COLUMN "T_POLICY"."ORIGINJSON" IS '传入原始参数json';

COMMENT ON COLUMN "T_POLICY"."POLICYITEM" IS '二进制表示的策略项目配置情况,例如二进制0101表示该策略的第1,3项目配置,其他未配置';

COMMENT ON COLUMN "T_POLICY"."COPYNUM" IS '策略复制编号';

COMMENT ON COLUMN "T_POLICY"."OLDWRAPPAPP" IS '保存更新前的沙箱应用';

COMMENT ON COLUMN "T_POLICY"."ALARMID" IS '告警';

COMMENT ON TABLE "T_PERM_TEMPLATE_MENU" IS '权限模板对应的菜单权限';

COMMENT ON COLUMN "T_PERM_TEMPLATE_MENU"."TEMPLATEID" IS '权限模板id';

COMMENT ON COLUMN "T_PERM_TEMPLATE_MENU"."CODE" IS '菜单编号';

COMMENT ON COLUMN "T_PERM_TEMPLATE_MENU"."AUTHORITY" IS '菜单对应的权限 0-查询 1-管理';

COMMENT ON COLUMN "T_PERM_TEMPLATE_API"."TEMPLATEID" IS '权限模板id';

COMMENT ON TABLE "T_PERM_TEMPLATE" IS '权限模板';

COMMENT ON COLUMN "T_PERM_TEMPLATE"."NAME" IS '模板名称';

COMMENT ON COLUMN "T_PERM_TEMPLATE"."DESCRIPTION" IS '描述';

COMMENT ON COLUMN "T_PERM_TEMPLATE"."SYSFLAG" IS '是否系统内置 0-否 1-是';

COMMENT ON COLUMN "T_PERM_TEMPLATE"."LOGINID" IS '管理员id';

CREATE INDEX "IDX_T_NOTIFICATIONS_LOGON_CREATE_TIME_DELETED_RECEIVED"
ON "T_NOTIFICATIONS_LOGON"("DELETED","RECEIVED","CREATE_TIME");

CREATE INDEX "IDX_T_NOTIFICATIONS_LOGON_CREATE_TIME"
ON "T_NOTIFICATIONS_LOGON"("CREATE_TIME");

COMMENT ON TABLE "T_NOTIFICATIONS_LOGON" IS '通知中心消息历史纪录';

COMMENT ON COLUMN "T_NOTIFICATIONS_LOGON"."NOTIFICATION_ID" IS '客户端程序负责维护';

COMMENT ON COLUMN "T_NOTIFICATIONS_LOGON"."CREATE_TIME" IS '插入时间';

COMMENT ON COLUMN "T_NOTIFICATIONS_LOGON"."DELETED" IS '标记逻辑删除，0:未删除，1:删除';

COMMENT ON COLUMN "T_NOTIFICATIONS_LOGON"."READ" IS '已读未读：0:未定义;1:未读;2:已读';

COMMENT ON COLUMN "T_NOTIFICATIONS_LOGON"."SENDER" IS '可以理解为发件人名称';

COMMENT ON COLUMN "T_NOTIFICATIONS_LOGON"."RECEIVED" IS 'reference t_sys_user.loginid';

COMMENT ON COLUMN "T_NOTIFICATIONS_LOGON"."CONTENT" IS '极限内容按5000设备bigint(20)长度计算确定的datatype';

CREATE INDEX "NOTIFICATION_CLIENT_ID"
ON "T_NOTIFICATION"("CLIENTID");

CREATE INDEX "NOTIFICATION_TYPE"
ON "T_NOTIFICATION"("TYPE");

COMMENT ON TABLE "T_NOTIFICATION" IS 'notification表, 用于存储BeMail Console向Client发送的推送消息';

COMMENT ON COLUMN "T_NOTIFICATION"."ID" IS '主键';

COMMENT ON COLUMN "T_NOTIFICATION"."CLIENTID" IS '通知所对应的clientId';

COMMENT ON COLUMN "T_NOTIFICATION"."MESSAGE" IS '通知的具体内容';

COMMENT ON COLUMN "T_NOTIFICATION"."STATUS" IS '状态 0 - SENDING, -1 - TIMEOUT, -2 - REFUSED, 2000 - SUCCESS, 5001 - ERROR';

COMMENT ON COLUMN "T_NOTIFICATION"."TYPE" IS '类型 pf - Profile变更， pl - 策略下发';

COMMENT ON COLUMN "T_NOTIFICATION"."SILENT" IS '1 - 静默 2 - 非静默';

COMMENT ON COLUMN "T_NOTIFICATION"."EVENT" IS '触发下发消息的事件';

COMMENT ON COLUMN "T_NOTIFICATION"."COMMENTS" IS '关于通知的一些备注信息';

COMMENT ON COLUMN "T_NOTIFICATION"."CREATEDDATETIME" IS '创建时间';

COMMENT ON COLUMN "T_NOTIFICATION"."UPDATEDDATETIME" IS '修改时间';

COMMENT ON TABLE "T_MEM_TASK" IS 'mem任务信息表';

COMMENT ON COLUMN "T_MEM_TASK"."ID" IS '任务id';

COMMENT ON COLUMN "T_MEM_TASK"."TYPE" IS '任务类型';

COMMENT ON COLUMN "T_MEM_TASK"."TIMES" IS '执行次数';

COMMENT ON COLUMN "T_MEM_TASK"."PRIORITY" IS '优先级';

COMMENT ON COLUMN "T_MEM_TASK"."FAILCAUSE" IS '失败原因';

COMMENT ON COLUMN "T_MEM_TASK"."LOGINID" IS '用户名';

COMMENT ON COLUMN "T_MEM_TASK"."UDID" IS '设备唯一标识';

COMMENT ON COLUMN "T_MEM_TASK"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_MEM_TASK"."UPDATETIME" IS '修改时间';

COMMENT ON TABLE "T_MALWARE_LIST" IS '危险应用表';

COMMENT ON COLUMN "T_MALWARE_LIST"."PKGNAME" IS '应用包名';

COMMENT ON COLUMN "T_MALWARE_LIST"."UUID" IS 'UUID';

COMMENT ON COLUMN "T_MALWARE_LIST"."VERSION" IS '版本';

COMMENT ON COLUMN "T_MALWARE_LIST"."NAME" IS '名称';

COMMENT ON COLUMN "T_MALWARE_LIST"."SCANID" IS '扫描ID(t_virusscan_history的ID)';

COMMENT ON COLUMN "T_MALWARE_LIST"."HANDLESTATUS" IS '危险应用处理状态(0为未处理，1为删除， 2为忽略)';

COMMENT ON COLUMN "T_MALWARE_LIST"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_MALWARE_LIST"."MALWAREID" IS '病毒序列';

COMMENT ON COLUMN "T_LOG_PFYH"."LOGINID" IS '用户名';

COMMENT ON COLUMN "T_LOG_PFYH"."APPID" IS '应用ID';

COMMENT ON COLUMN "T_LOG_PFYH"."OPERTIME" IS '操作时间';

COMMENT ON COLUMN "T_LOG_PFYH"."OPERDESC" IS '操作描述';

CREATE INDEX "IDX_TLH_DEVICEID"
ON "T_LOCATION_HISTORY"("DEVICEID");

CREATE INDEX "IDX_TLH_DAYFLAG"
ON "T_LOCATION_HISTORY"("DAYFLAG");

CREATE INDEX "IDX_TLH_ID"
ON "T_LOCATION_HISTORY"("ID");

COMMENT ON TABLE "T_LOCATION_HISTORY" IS '设备定位历史表';

COMMENT ON COLUMN "T_LOCATION_HISTORY"."UUID" IS '指令uuid';

COMMENT ON COLUMN "T_LOCATION_HISTORY"."CREATETIME" IS '指令下发时间';

COMMENT ON COLUMN "T_LOCATION_HISTORY"."UPDATETIME" IS '执行完成更新时间';

COMMENT ON COLUMN "T_LOCATION_HISTORY"."STATUS" IS '执行状态,0:指令下发未执行;1:执行成功;21--执行失败';

COMMENT ON COLUMN "T_LOCATION_HISTORY"."LONGITUDE" IS '经度';

COMMENT ON COLUMN "T_LOCATION_HISTORY"."LATITUDE" IS '纬度';

COMMENT ON COLUMN "T_LOCATION_HISTORY"."LOCATION" IS '定位地点';

COMMENT ON COLUMN "T_LOCATION_HISTORY"."LOCATEDTIME" IS '定位时间';

COMMENT ON COLUMN "T_LOCATION_HISTORY"."DAYFLAG" IS '日期标记';

COMMENT ON TABLE "T_LDAP_CONFIG" IS 'ldap配置表';

COMMENT ON COLUMN "T_LDAP_CONFIG"."TYPE" IS 'ad or ldap';

COMMENT ON COLUMN "T_LDAP_CONFIG"."ROOTNAME" IS '导入到的根组名称';

COMMENT ON COLUMN "T_LDAP_CONFIG"."URL" IS '地址+端口';

COMMENT ON COLUMN "T_LDAP_CONFIG"."BASE" IS 'baseDN';

COMMENT ON COLUMN "T_LDAP_CONFIG"."DOMAIN" IS '域（仅ad需要）';

COMMENT ON COLUMN "T_LDAP_CONFIG"."USERNAME" IS '登录用户名';

COMMENT ON COLUMN "T_LDAP_CONFIG"."PASSWORD" IS '登录密码';

COMMENT ON COLUMN "T_LDAP_CONFIG"."LOGINFILTER" IS '账号名匹配模式';

COMMENT ON COLUMN "T_LDAP_CONFIG"."CONFLICTHANDLE" IS '导入冲突处理方式 0-不导入 1-直接覆盖';

COMMENT ON COLUMN "T_LDAP_CONFIG"."LDAPVERIFY" IS '是否采用ldap认证 0-否 1-是';

COMMENT ON COLUMN "T_LDAP_CONFIG"."AUTOSYNCINTERVAL" IS '自动同步周期（小时） 0-不自动同步';

COMMENT ON COLUMN "T_LDAP_CONFIG"."PARENTGROUPID" IS '导入到的目标组id';

COMMENT ON COLUMN "T_LDAP_CONFIG"."PARENTGROUPNAME" IS '导入到的目标组名称';

COMMENT ON COLUMN "T_LDAP_CONFIG"."LASTSYNCSTARTTIME" IS '上次同步开始时间';

COMMENT ON COLUMN "T_LDAP_CONFIG"."LASTSYNCTIME" IS '上次同步结束时间';

COMMENT ON COLUMN "T_LDAP_CONFIG"."LASTSYNCRESULT" IS '上次同步结果';

COMMENT ON COLUMN "T_LDAP_CONFIG"."LOGINID" IS 't_user中loginid对应的ldap属性';

COMMENT ON COLUMN "T_LDAP_CONFIG"."NAME" IS 't_user中name对应的ldap属性';

COMMENT ON COLUMN "T_LDAP_CONFIG"."MAIL" IS 't_user中mail对应的ldap属性';

COMMENT ON COLUMN "T_LDAP_CONFIG"."MOBILE" IS 't_user中mobile对应的ldap属性';

COMMENT ON COLUMN "T_LDAP_CONFIG"."SYNCFLAG" IS '导入完成标志 0-导入完成 1-正在导入';

COMMENT ON COLUMN "T_LDAP_CONFIG"."USERFILTER" IS '用户匹配模式';

COMMENT ON COLUMN "T_LDAP_CONFIG"."OUFILTER" IS '用户组匹配模式';

COMMENT ON COLUMN "T_LDAP_CONFIG"."LASTSYNCUSERS" IS '上次导入用户数';

COMMENT ON COLUMN "T_LDAP_CONFIG"."LASTSYNCUGROUPS" IS '上次导入用户组数';

COMMENT ON COLUMN "T_LDAP_CONFIG"."GROUPNAME" IS '组名';

CREATE INDEX "IDX_TLL_DEVICEID"
ON "T_LAST_LOCATION"("DEVICEID");

COMMENT ON TABLE "T_LAST_LOCATION" IS '设备最近定位表';

COMMENT ON COLUMN "T_LAST_LOCATION"."CREATETIME" IS '指令下发时间';

COMMENT ON COLUMN "T_LAST_LOCATION"."UPDATETIME" IS '执行完成更新时间';

COMMENT ON COLUMN "T_LAST_LOCATION"."LONGITUDE" IS '经度';

COMMENT ON COLUMN "T_LAST_LOCATION"."LATITUDE" IS '纬度';

COMMENT ON COLUMN "T_LAST_LOCATION"."LOCATION" IS '定位地点';

COMMENT ON COLUMN "T_LAST_LOCATION"."LOCATEDTIME" IS '定位时间';

COMMENT ON TABLE "T_LABEL" IS '标签表';

COMMENT ON COLUMN "T_LABEL"."ID" IS '标签id';

COMMENT ON COLUMN "T_LABEL"."NAME" IS '标签名称';

COMMENT ON COLUMN "T_LABEL"."TYPE" IS '标签类型（静态-1、动态-2）';

COMMENT ON COLUMN "T_LABEL"."DESCRIPTION" IS '标签描述';

COMMENT ON COLUMN "T_LABEL"."CREATOR" IS '创建者';

COMMENT ON COLUMN "T_LABEL"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_LABEL"."UPDATETIME" IS '更新时间';

COMMENT ON TABLE "T_IOS_MODEL_DICT" IS 'ios型号字典表';

COMMENT ON COLUMN "T_IOS_MODEL_DICT"."MODEL" IS '型号(如：mc134ch)';

COMMENT ON COLUMN "T_IOS_MODEL_DICT"."GENERATION" IS '第几代(iphone 3g , iphone 4, ipad 2)';

COMMENT ON COLUMN "T_IOS_MODEL_DICT"."VARIANT" IS 'wifi , gsm ,cdma';

COMMENT ON COLUMN "T_IOS_MODEL_DICT"."IDENTIFIER" IS '标识: ipad1,1 ';

COMMENT ON COLUMN "T_IOS_MODEL_DICT"."COLOR" IS '颜色';

COMMENT ON COLUMN "T_IOS_MODEL_DICT"."STORAGE" IS '存储: 8g , 16g , 32g ,64g';

COMMENT ON TABLE "T_IOS_BUILDIN_APP" IS 'IOS内置应用';

COMMENT ON COLUMN "T_IOS_BUILDIN_APP"."NAME" IS '名称';

COMMENT ON COLUMN "T_IOS_BUILDIN_APP"."PKGNAME" IS '应用id';

COMMENT ON COLUMN "T_IOS_BUILDIN_APP"."MODELTYPE" IS 'MDM4.0.1开始设备型号允许多选,20-iphone 21-ipad 22-ipad mini 23-itouch';

COMMENT ON TABLE "T_IND_STRATEGY_MAX_SET" IS '首页策略显示设置表';

COMMENT ON COLUMN "T_IND_STRATEGY_MAX_SET"."STRATEGYID" IS '策略ID';

COMMENT ON COLUMN "T_IND_STRATEGY_MAX_SET"."STRATEGYTYPE" IS '策略类型 1 配置策略 2 限制策略 3 合规策略 4 围栏策略';

COMMENT ON COLUMN "T_IND_STRATEGY_MAX_SET"."LOGINID" IS '管理员id';

COMMENT ON TABLE "T_INDEX_STRATEGY_SET" IS '首页策略显示设置表';

COMMENT ON COLUMN "T_INDEX_STRATEGY_SET"."STRATEGYID" IS '策略ID';

COMMENT ON COLUMN "T_INDEX_STRATEGY_SET"."STRATEGYTYPE" IS '策略类型 1 配置策略 2 限制策略 3 合规策略 4 围栏策略';

COMMENT ON COLUMN "T_INDEX_STRATEGY_SET"."LOGINID" IS '管理员id';

COMMENT ON TABLE "T_INDEX_SHORTCUT_SET" IS '首页快捷功能设置表';

COMMENT ON COLUMN "T_INDEX_SHORTCUT_SET"."IDENTIFIER" IS '功能标识符';

COMMENT ON COLUMN "T_INDEX_SHORTCUT_SET"."URL" IS '功能地址';

COMMENT ON COLUMN "T_INDEX_SHORTCUT_SET"."CLASSNAME" IS '功能图标class名称';

COMMENT ON COLUMN "T_INDEX_SHORTCUT_SET"."REMARK" IS '功能描述';

COMMENT ON COLUMN "T_INDEX_SHORTCUT_SET"."LOGINID" IS '管理员id';

COMMENT ON COLUMN "T_INDEX_SHORTCUT_SET"."HOVERCLASSNAME" IS 'hoverClass名称';

COMMENT ON COLUMN "T_INDEX_SHORTCUT_SET"."MENUCODE" IS '菜单code';

COMMENT ON COLUMN "T_INDEX_SHORTCUT_SET"."FUNCCODE" IS '权限编码';

COMMENT ON TABLE "T_INDEX_SHORTCUT_DEF" IS '首页快捷功能默认表';

COMMENT ON COLUMN "T_INDEX_SHORTCUT_DEF"."IDENTIFIER" IS '功能标识符';

COMMENT ON COLUMN "T_INDEX_SHORTCUT_DEF"."URL" IS '功能地址';

COMMENT ON COLUMN "T_INDEX_SHORTCUT_DEF"."CLASSNAME" IS '功能图标class名称';

COMMENT ON COLUMN "T_INDEX_SHORTCUT_DEF"."REMARK" IS '功能描述';

COMMENT ON COLUMN "T_INDEX_SHORTCUT_DEF"."HOVERCLASSNAME" IS 'hoverClass名称';

COMMENT ON COLUMN "T_INDEX_SHORTCUT_DEF"."MENUCODE" IS '菜单code';

COMMENT ON COLUMN "T_INDEX_SHORTCUT_DEF"."FUNCCODE" IS '权限编码';

COMMENT ON TABLE "T_INDEX_CHART_SET" IS '首页图表设置表';

COMMENT ON COLUMN "T_INDEX_CHART_SET"."IDENTIFIER" IS '标识符';

COMMENT ON COLUMN "T_INDEX_CHART_SET"."REMARK" IS '描述';

COMMENT ON COLUMN "T_INDEX_CHART_SET"."LOGINID" IS '管理员id';

COMMENT ON TABLE "T_INDEX_CHART_DEF" IS '首页图表默认表';

COMMENT ON COLUMN "T_INDEX_CHART_DEF"."IDENTIFIER" IS '标识符';

COMMENT ON COLUMN "T_INDEX_CHART_DEF"."REMARK" IS '描述';

COMMENT ON TABLE "T_INDEX_APP_SET" IS '首页应用显示表';

COMMENT ON COLUMN "T_INDEX_APP_SET"."APPID" IS '应用ID';

COMMENT ON COLUMN "T_INDEX_APP_SET"."LOGINID" IS '管理员id';

COMMENT ON TABLE "T_INDEX_APP_MAX_SET" IS '首页应用显示表';

COMMENT ON COLUMN "T_INDEX_APP_MAX_SET"."APPID" IS '应用ID';

COMMENT ON COLUMN "T_INDEX_APP_MAX_SET"."LOGINID" IS '管理员id';

COMMENT ON TABLE "T_IMPORT_SERVER" IS '导入服务器信息表';

COMMENT ON COLUMN "T_IMPORT_SERVER"."ID" IS 'id';

COMMENT ON COLUMN "T_IMPORT_SERVER"."SERVERTYPE" IS '0 ftp服务器   , 1 共享目录服务器   , 2 sharepoint';

COMMENT ON COLUMN "T_IMPORT_SERVER"."HOSTNAME" IS '所导入的服务器hostname';

COMMENT ON COLUMN "T_IMPORT_SERVER"."SERVERNAME" IS '所导入的服务器名称';

COMMENT ON COLUMN "T_IMPORT_SERVER"."AUTHNAME" IS '登录所导入的服务器账号';

COMMENT ON COLUMN "T_IMPORT_SERVER"."AUTHPASSWORD" IS '登录所导入的服务器密码';

COMMENT ON COLUMN "T_IMPORT_SERVER"."ROOTPATH" IS '所要导入的根目录';

COMMENT ON COLUMN "T_IMPORT_SERVER"."SYNCFREQUENCY" IS '同步频率';

COMMENT ON COLUMN "T_IMPORT_SERVER"."FILECOUNT" IS '导入的文档数量';

COMMENT ON COLUMN "T_IMPORT_SERVER"."FILETOTALSIZE" IS '导入的文档总大小';

COMMENT ON COLUMN "T_IMPORT_SERVER"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_IMPORT_SERVER"."UPDATETIME" IS '修改时间';

COMMENT ON COLUMN "T_IMPORT_SERVER"."CREATEBY" IS '创建人';

COMMENT ON COLUMN "T_IMPORT_SERVER"."UPDATEBY" IS '修改人';

COMMENT ON TABLE "T_ILLEGAL_TIME" IS '违规次数表';

COMMENT ON COLUMN "T_ILLEGAL_TIME"."USERID" IS '用户编号';

COMMENT ON COLUMN "T_ILLEGAL_TIME"."DEVICEID" IS '设备编号';

COMMENT ON COLUMN "T_ILLEGAL_TIME"."TYPE" IS '策略类型';

COMMENT ON COLUMN "T_ILLEGAL_TIME"."ILLEGALDATE" IS '违规日期';

COMMENT ON COLUMN "T_ILLEGAL_TIME"."NUM" IS '违规数量';

COMMENT ON COLUMN "T_ILLEGAL_TIME"."UPDATETIME" IS '最后更新时间';

COMMENT ON TABLE "T_ILLEGAL_SMSSEND_LOG" IS '告警发送信息记录表';

COMMENT ON COLUMN "T_ILLEGAL_SMSSEND_LOG"."MOBILES" IS '告警接收手机号集合';

COMMENT ON COLUMN "T_ILLEGAL_SMSSEND_LOG"."EMAILS" IS '告警接收邮件集合';

COMMENT ON COLUMN "T_ILLEGAL_SMSSEND_LOG"."DESCRIPTION" IS '描述信息';

CREATE INDEX "HRGROUPID_INDEX"
ON "T_GROUP_MAP"("HRGROUPID");

COMMENT ON TABLE "T_GROUP_MAP" IS '组层级关系映射表';

COMMENT ON COLUMN "T_GROUP_MAP"."GROUPID" IS '组id';

COMMENT ON COLUMN "T_GROUP_MAP"."HRGROUPID" IS '层级组id';

CREATE INDEX "TYPE_INDEX"
ON "T_GROUP_CENTER"("TYPE");

CREATE INDEX "PARENTID_INDEX1"
ON "T_GROUP_CENTER"("PARENTID");

COMMENT ON TABLE "T_GROUP_CENTER" IS '用户组中间表';

COMMENT ON COLUMN "T_GROUP_CENTER"."ID" IS '组标识';

COMMENT ON COLUMN "T_GROUP_CENTER"."NAME" IS '组名';

COMMENT ON COLUMN "T_GROUP_CENTER"."PARENTID" IS '上级组标识';

COMMENT ON COLUMN "T_GROUP_CENTER"."TYPE" IS '0-无变化(默认)，1-新增 2-删除 3-基本信息变更 4-组织机构变更';

COMMENT ON COLUMN "T_GROUP_CENTER"."GRAGE" IS '级别 根组级别为1';

COMMENT ON COLUMN "T_GROUP_CENTER"."DISPLAYFLAG" IS '是否显示 为null或1展示，0 不展示';

COMMENT ON COLUMN "T_GROUP_CENTER"."NOTE" IS '备注';

COMMENT ON COLUMN "T_GROUP_CENTER"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_GROUP_CENTER"."UPDATETIME" IS '更新时间';

CREATE INDEX "STATUS_INDEX"
ON "T_GROUP"("STATUS");

CREATE INDEX "T_GROUP_GUID_INDEX"
ON "T_GROUP"("GUID");

COMMENT ON TABLE "T_GROUP" IS '设备用户组表';

COMMENT ON COLUMN "T_GROUP"."ID" IS '组标识';

COMMENT ON COLUMN "T_GROUP"."GUID" IS 'ad/ldap同步时的唯一标识';

COMMENT ON COLUMN "T_GROUP"."NAME" IS '组名';

COMMENT ON COLUMN "T_GROUP"."PARENTID" IS '上级组标识';

COMMENT ON COLUMN "T_GROUP"."CANLOGINSELF" IS '是否可登录自服务平台 0-否 1-是';

COMMENT ON COLUMN "T_GROUP"."CANREGISTDEVICE" IS '是否能够进行设备注册0-否 1-是';

COMMENT ON COLUMN "T_GROUP"."CANELIMINATEDEVICE" IS '是否能够进行设备淘汰0-否 1-是';

COMMENT ON COLUMN "T_GROUP"."ALLOWACTIVATENUM" IS '允许激活的设备数量';

COMMENT ON COLUMN "T_GROUP"."TYPE" IS '0-自定义 1-ad/ldap同步';

COMMENT ON COLUMN "T_GROUP"."STATUS" IS '组状态 1-有效 0-无效  -1-删除';

COMMENT ON COLUMN "T_GROUP"."DESCR" IS '描述';

COMMENT ON COLUMN "T_GROUP"."CREATTIME" IS '创建时间';

COMMENT ON COLUMN "T_GROUP"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_GROUP"."ALLOWUNREGISTEREDACTIVATE" IS '是否允许未注册设备激活,0-否 1-是';

COMMENT ON COLUMN "T_GROUP"."ALLOWINCONSISTENTACTIVATE" IS '是否允许设备激活与设备注册时的信息不一致时激活,0-否 1-是';

COMMENT ON COLUMN "T_GROUP"."SYNCBACTCHNO" IS 'ladp自动同步批次号';

COMMENT ON COLUMN "T_GROUP"."GROUPCODE" IS '组层级编码';

COMMENT ON COLUMN "T_GROUP"."FORCEMODIFYPWD" IS '强制初次登录修改密码 0-否 1-是';

COMMENT ON COLUMN "T_GROUP"."MAXPWDAGE" IS '用户密码有效期 0-永久';

COMMENT ON COLUMN "T_GROUP"."MAXFAILEDATTEMPTS" IS '用户密码输入尝试次数 0-不限';

COMMENT ON COLUMN "T_GROUP"."LOCKINTERVAL" IS '密码输入超过次数后锁定时长 -1 从组继承配置 0-永久锁定 N 锁定多少分钟';

COMMENT ON COLUMN "T_GROUP"."LDAPCONFIGID" IS '关联的LDAP配置';

COMMENT ON COLUMN "T_GROUP"."NEEDLOCKPASSWD" IS '是否需要解锁密码,0-否 1-是';

COMMENT ON COLUMN "T_GROUP"."FORBIDUNLOAD" IS '是否防止卸载，0-否 1-是';

COMMENT ON COLUMN "T_GROUP"."PASSWORDSTRENGTH" IS '1：弱（可以是纯字母或数字，6-16位）、2：中等（至少包含字母数字，8-16位）、3：复杂（至少包含大小写的字母以及数字，8-16位）';

COMMENT ON COLUMN "T_GROUP"."ALLOWACTIVATE" IS '是否允许激活设备管理器,0--不激活;1--强制激活;2--按需激活';

COMMENT ON COLUMN "T_GROUP"."ALLOWLOGOUT" IS '允许客户端显示登出按钮，1表示允许显示，0不允许显示';

COMMENT ON COLUMN "T_GROUP"."THIRDGROUPID" IS '同步第三方服务中组织id';

COMMENT ON COLUMN "T_GROUP"."SYNCFLAG" IS '是否上报成功  1-上报成功 2-上报失败';

COMMENT ON COLUMN "T_GROUP"."ISSYNCGOOGLE" IS '是否需要同步到Google Play Enterprise; 0-否;1-是';

COMMENT ON COLUMN "T_GROUP"."GOOGLEENTERPRISEID" IS 'Google Play Enterprise id';

COMMENT ON COLUMN "T_GROUP"."GPATH" IS '用户组全路径';

COMMENT ON COLUMN "T_GROUP"."SYNCCONNECTORID" IS 't_connector表中connector id';

COMMENT ON COLUMN "T_GROUP"."ORGID" IS '机构编号';

COMMENT ON COLUMN "T_GROUP"."ORGTYPE" IS '机构类型代码 H-总行 B-分行 S-支行';

COMMENT ON TABLE "T_GOOGLE_USER_PRODUCT" IS 'Google Play user Available ProductSet';

COMMENT ON COLUMN "T_GOOGLE_USER_PRODUCT"."BEHAVIOR" IS 'productSetBehavior:includeAll,allApproved,whitelist';

COMMENT ON COLUMN "T_GOOGLE_USER_PRODUCT"."USERIDS" IS '用户id';

COMMENT ON COLUMN "T_GOOGLE_USER_PRODUCT"."PRODUCTIDS" IS 'productSet';

COMMENT ON COLUMN "T_GOOGLE_USER_PRODUCT"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_GOOGLE_USER_PRODUCT"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_GOOGLE_PLAY_PRODUCT"."ID" IS '自增主键';

COMMENT ON COLUMN "T_GOOGLE_PLAY_PRODUCT"."PRODUCTID" IS 'google product 主键';

COMMENT ON COLUMN "T_GOOGLE_PLAY_PRODUCT"."SMALLICONURL" IS '小图标';

COMMENT ON COLUMN "T_GOOGLE_PLAY_PRODUCT"."ICONURL" IS '图标';

COMMENT ON COLUMN "T_GOOGLE_PLAY_PRODUCT"."TITLE" IS '标题';

COMMENT ON COLUMN "T_GOOGLE_PLAY_PRODUCT"."LASTUPDATEDTIME" IS '最新更新时间';

COMMENT ON COLUMN "T_GOOGLE_PLAY_PRODUCT"."AUTHORNAME" IS '产品发行方';

COMMENT ON COLUMN "T_GOOGLE_PLAY_PRODUCT"."MINANDROIDSDKVERSION" IS 'android最小版本';

COMMENT ON COLUMN "T_GOOGLE_PLAY_PRODUCT"."KIND" IS 'google 资源类型';

COMMENT ON COLUMN "T_GOOGLE_PLAY_PRODUCT"."VERSIONCODE" IS '版本号';

COMMENT ON COLUMN "T_GOOGLE_PLAY_PRODUCT"."VERSIONSTRING" IS '版本号';

COMMENT ON COLUMN "T_GOOGLE_PLAY_PRODUCT"."DETAILSURL" IS '详情地址';

COMMENT ON COLUMN "T_GOOGLE_PLAY_PRODUCT"."WORKDETAILSURL" IS '链接地址';

COMMENT ON COLUMN "T_GOOGLE_PLAY_PRODUCT"."MCMID" IS '生效的配置';

COMMENT ON COLUMN "T_GOOGLE_PLAY_PRODUCT"."APPID" IS '应用商店appid';

COMMENT ON TABLE "T_GOOGLE_LAYOUT_PAGE" IS 'Google Play store layout page';

COMMENT ON COLUMN "T_GOOGLE_LAYOUT_PAGE"."ORDERINLAYOUT" IS 'page页序号';

COMMENT ON COLUMN "T_GOOGLE_LAYOUT_PAGE"."PAGEID" IS 'id from Google';

COMMENT ON COLUMN "T_GOOGLE_LAYOUT_PAGE"."PAGENAME" IS 'page页名称';

COMMENT ON COLUMN "T_GOOGLE_LAYOUT_PAGE"."CLUSTERIDS" IS '应用群集id';

COMMENT ON COLUMN "T_GOOGLE_LAYOUT_PAGE"."CLUSTERNAMES" IS '应用群集名称';

COMMENT ON COLUMN "T_GOOGLE_LAYOUT_PAGE"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_GOOGLE_LAYOUT_PAGE"."UPDATETIME" IS '更新时间';

CREATE INDEX "FOLDERDISTRIBUTEID"
ON "T_FOLDER_DIST_USER"("FOLDERDISTRIBUTEID");

COMMENT ON TABLE "T_FOLDER_DIST_USER" IS '文档分发用户关联表';

COMMENT ON COLUMN "T_FOLDER_DIST_USER"."ID" IS 'id';

COMMENT ON COLUMN "T_FOLDER_DIST_USER"."FOLDERDISTRIBUTEID" IS '文件夹分发条件id';

COMMENT ON COLUMN "T_FOLDER_DIST_USER"."USERID" IS '用户id';

COMMENT ON COLUMN "T_FOLDER_DIST_USER"."CUSTOMFLAG" IS '自定义标识: 0-继承 ;1-自定义';

COMMENT ON COLUMN "T_FOLDER_DIST_USER"."EXCEPTIONFLAG" IS '例外标识: 0-添加 ;1-排除';

COMMENT ON TABLE "T_FOLDER_DIST_GROUP" IS '文件夹分发条件用户组关联表';

COMMENT ON COLUMN "T_FOLDER_DIST_GROUP"."ID" IS 'id';

COMMENT ON COLUMN "T_FOLDER_DIST_GROUP"."FOLDERDISTRIBUTEID" IS '文件夹分发条件id';

COMMENT ON COLUMN "T_FOLDER_DIST_GROUP"."GROUPID" IS '用户组id';

COMMENT ON COLUMN "T_FOLDER_DIST_GROUP"."CUSTOMFLAG" IS '自定义标识: 0-继承 ;1-自定义';

COMMENT ON COLUMN "T_FOLDER_DIST_GROUP"."EXCEPTIONFLAG" IS '例外标识: 0-添加 ;1-排除';

CREATE INDEX "FOLDERID"
ON "T_FOLDER_DISTRIBUTE"("FOLDERID");

COMMENT ON TABLE "T_FOLDER_DISTRIBUTE" IS '文件夹分发条件信息表(每一条记录都是对一个文件夹的分发条件)';

COMMENT ON COLUMN "T_FOLDER_DISTRIBUTE"."ID" IS '分发条件id';

COMMENT ON COLUMN "T_FOLDER_DISTRIBUTE"."FOLDERID" IS '文件夹id';

COMMENT ON COLUMN "T_FOLDER_DISTRIBUTE"."DESCRIPTION" IS '分发条件描述';

COMMENT ON COLUMN "T_FOLDER_DISTRIBUTE"."USERTAGID" IS '用户标签id';

COMMENT ON COLUMN "T_FOLDER_DISTRIBUTE"."TIMETAGID" IS '时间标签id';

COMMENT ON COLUMN "T_FOLDER_DISTRIBUTE"."POSITIONTAGID" IS '位置标签id';

COMMENT ON COLUMN "T_FOLDER_DISTRIBUTE"."RELATIONSHIP" IS '设备所属关系: 逗号分割的字符串(1,2,3)';

COMMENT ON COLUMN "T_FOLDER_DISTRIBUTE"."DISTRIBUTETYPE" IS '是否推送通知:  0  不通知  , 1  apns通知';

COMMENT ON COLUMN "T_FOLDER_DISTRIBUTE"."AUTHOPERTYPE" IS '文档操作权限: 0   预览  , 1   预览下载  ';

COMMENT ON COLUMN "T_FOLDER_DISTRIBUTE"."LABELID" IS '标签id';

COMMENT ON TABLE "T_FOLDER" IS '文件夹信息表';

COMMENT ON COLUMN "T_FOLDER"."ID" IS '文件夹标识id';

COMMENT ON COLUMN "T_FOLDER"."FOLDERNAME" IS '文件夹名称';

COMMENT ON COLUMN "T_FOLDER"."FOLDERURL" IS '文件夹url路径';

COMMENT ON COLUMN "T_FOLDER"."FOLDERTYPE" IS '文件夹类型: 0 自定义  , 1 导入生成';

COMMENT ON COLUMN "T_FOLDER"."FOLDERDIR" IS '当前文件夹的父文件夹逻辑位置(例如: /a/b)';

COMMENT ON COLUMN "T_FOLDER"."FOLDERDIRIDS" IS '文件夹所属文件夹全路径id串(1,2,3,4,5)';

COMMENT ON COLUMN "T_FOLDER"."REMARK" IS '备注';

COMMENT ON COLUMN "T_FOLDER"."PARENTFOLDERID" IS '父目录id( 如果无父目录则为 -1 )';

COMMENT ON COLUMN "T_FOLDER"."IMPORTSERVERID" IS '如果文件夹是导入生成, 是则需要关联一个 importserverid 获得服务器信息';

COMMENT ON COLUMN "T_FOLDER"."ISDELETE" IS '是否删除: 0 否   , 1 是';

COMMENT ON COLUMN "T_FOLDER"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_FOLDER"."UPDATETIME" IS '修改时间';

COMMENT ON COLUMN "T_FOLDER"."CREATEBY" IS '创建人';

COMMENT ON COLUMN "T_FOLDER"."UPDATEBY" IS '修改人';

COMMENT ON COLUMN "T_FOLDER"."TOPLEVEL" IS '是否是管理员的根目录';

CREATE INDEX "FILEID"
ON "T_FILE_USER_STAR"("FILEID");

COMMENT ON TABLE "T_FILE_USER_STAR" IS '用户星标文件关联表';

COMMENT ON COLUMN "T_FILE_USER_STAR"."ID" IS 'id';

COMMENT ON COLUMN "T_FILE_USER_STAR"."FILEID" IS '加星文件id';

COMMENT ON COLUMN "T_FILE_USER_STAR"."USERID" IS '哪个用户id对该文件加星';

COMMENT ON COLUMN "T_FILE_USER_STAR"."CREATETIME" IS '创建时间';

COMMENT ON TABLE "T_FILE_USER_OPEN" IS '用户最近打开文件';

COMMENT ON COLUMN "T_FILE_USER_OPEN"."ID" IS 'id';

COMMENT ON COLUMN "T_FILE_USER_OPEN"."FILEID" IS '文件id';

COMMENT ON COLUMN "T_FILE_USER_OPEN"."USERID" IS '用户id';

COMMENT ON COLUMN "T_FILE_USER_OPEN"."LASTOPENTIME" IS '最近打开时间';

COMMENT ON COLUMN "T_FILE_USER_OPEN"."CREATETIME" IS '创建时间';

CREATE INDEX "FILEDISTRIBUTEID"
ON "T_FILE_DIST_USER"("FILEDISTRIBUTEID");

COMMENT ON TABLE "T_FILE_DIST_USER" IS '文档分发用户关联表';

COMMENT ON COLUMN "T_FILE_DIST_USER"."ID" IS 'id';

COMMENT ON COLUMN "T_FILE_DIST_USER"."FILEDISTRIBUTEID" IS '文件分发条件id';

COMMENT ON COLUMN "T_FILE_DIST_USER"."USERID" IS '用户id';

COMMENT ON COLUMN "T_FILE_DIST_USER"."FILEID" IS '文件id';

COMMENT ON TABLE "T_FILE_DIST_GROUP" IS '文件分发条件用户组关联表';

COMMENT ON COLUMN "T_FILE_DIST_GROUP"."ID" IS 'id';

COMMENT ON COLUMN "T_FILE_DIST_GROUP"."FILEDISTRIBUTEID" IS '文件分发条件id';

COMMENT ON COLUMN "T_FILE_DIST_GROUP"."GROUPID" IS '用户组id';

COMMENT ON COLUMN "T_FILE_DIST_GROUP"."FILEID" IS '文件id';

COMMENT ON TABLE "T_FILE_DISTRIBUTE" IS '文档分发条件信息表(每一条记录都是对一个文档的分发条件)';

COMMENT ON COLUMN "T_FILE_DISTRIBUTE"."ID" IS 'id';

COMMENT ON COLUMN "T_FILE_DISTRIBUTE"."FILEID" IS '文件id';

COMMENT ON COLUMN "T_FILE_DISTRIBUTE"."RELATIONSHIP" IS '设备所属关系: 逗号分割的字符串(1,2,3)';

COMMENT ON COLUMN "T_FILE_DISTRIBUTE"."DISTRIBUTETYPE" IS '是否推送通知:  0  不通知  , 1  apns通知';

COMMENT ON COLUMN "T_FILE_DISTRIBUTE"."AUTHOPERTYPE" IS '文档操作权限: 0   预览  , 1  预览下载  ';

COMMENT ON COLUMN "T_FILE_DISTRIBUTE"."LABELID" IS '标签id';

COMMENT ON COLUMN "T_FILE_DISTRIBUTE"."CREATETIME" IS '分发时间';

COMMENT ON COLUMN "T_FILE_DISTRIBUTE"."CREATOR" IS '创建者';

CREATE INDEX "INDEX_STATUS"
ON "T_FILE"("STATUS");

COMMENT ON TABLE "T_FILE" IS '文件信息表';

COMMENT ON COLUMN "T_FILE"."ID" IS '文件id';

COMMENT ON COLUMN "T_FILE"."FILENAME" IS '文件名称';

COMMENT ON COLUMN "T_FILE"."FILEURL" IS '文件url路径';

COMMENT ON COLUMN "T_FILE"."FILEPDFURL" IS '文档转成pdf格式后的url路径';

COMMENT ON COLUMN "T_FILE"."FILEICON" IS '图标url';

COMMENT ON COLUMN "T_FILE"."FILETYPE" IS '类型: (microsoft office系列: 10 word , 11 excel , 12 powerpoint ..),(20 pdf ..),(text : 30 txt , 31 csv ...),( image: 40 png , 41 jpg , 42 gif ..),(50 html，60 zip) ..';

COMMENT ON COLUMN "T_FILE"."FILEDIR" IS '文件所在文件夹逻辑位置(例如: /a/b)';

COMMENT ON COLUMN "T_FILE"."FILEDIRIDS" IS '文件所属文件夹全路径id串(1,2,3,4,5)';

COMMENT ON COLUMN "T_FILE"."FILESIZE" IS '文件大小(单位: 字节)';

COMMENT ON COLUMN "T_FILE"."FILESOURCE" IS '文件来源: 0 管理员上传  , 1 ftp导入  , 2 共享目录导入  , 3 sharepoint , 4 其它';

COMMENT ON COLUMN "T_FILE"."FILEMD5" IS '文档md5值(判断内容是否有改动)';

COMMENT ON COLUMN "T_FILE"."CUSTOMVERSION" IS '用户文件版本';

COMMENT ON COLUMN "T_FILE"."VERSIONCODE" IS '版本号(后台标记)';

COMMENT ON COLUMN "T_FILE"."STATUS" IS '文件状态: 0 禁用   , 1 启用  ';

COMMENT ON COLUMN "T_FILE"."ISDELETE" IS '是否删除: 0 否   , 1 是';

COMMENT ON COLUMN "T_FILE"."CONVERTFLAG" IS 'pdf转换状态: 0 未转换  , 1 转换中  , 2  转换完成   , 3  转换失败';

COMMENT ON COLUMN "T_FILE"."FOLDERID" IS '文件所在的文件夹(如果不在任何文件夹下则为-1)';

COMMENT ON COLUMN "T_FILE"."STARFLAG" IS '是否是星标文档: 0  否  , 1  是';

COMMENT ON COLUMN "T_FILE"."LOCKFLAG" IS '是否给文件加锁: 0  否   , 1  是';

COMMENT ON COLUMN "T_FILE"."LOCKPASSWORD" IS '文件锁密码(md5加密后值)';

COMMENT ON COLUMN "T_FILE"."DESCRIPTION" IS '文件描述';

COMMENT ON COLUMN "T_FILE"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_FILE"."UPDATETIME" IS '修改时间';

COMMENT ON COLUMN "T_FILE"."CREATEBY" IS '创建人';

COMMENT ON COLUMN "T_FILE"."UPDATEBY" IS '修改人';

COMMENT ON COLUMN "T_FILE"."FILEPWD" IS '文档密码明文';

COMMENT ON COLUMN "T_FENCE_TRIGGER_LOG"."DEVICEUDID" IS '设备的唯一标识';

COMMENT ON COLUMN "T_FENCE_TRIGGER_LOG"."FUNCTION" IS '功能项';

COMMENT ON COLUMN "T_FENCE_TRIGGER_LOG"."EXPECTION" IS '事件类型（1：启用；2：禁用）';

COMMENT ON COLUMN "T_FENCE_TRIGGER_LOG"."RESULT" IS '1：成功;0：失败';

COMMENT ON TABLE "T_FENCE_INOUT_LOG" IS '进出围栏日志表';

COMMENT ON COLUMN "T_FENCE_INOUT_LOG"."UDID" IS '设备的唯一标识';

COMMENT ON COLUMN "T_FENCE_INOUT_LOG"."POLICYID" IS '策略id';

COMMENT ON COLUMN "T_FENCE_INOUT_LOG"."EVENTTYPE" IS '时间类型（1：进围栏；2：出围栏）';

COMMENT ON COLUMN "T_FENCE_INOUT_LOG"."STARTTIME" IS '围栏配置的开始时间';

COMMENT ON COLUMN "T_FENCE_INOUT_LOG"."ENDTIME" IS '围栏配置的结束时间';

COMMENT ON COLUMN "T_FENCE_INOUT_LOG"."LONGITUDE" IS '经度';

COMMENT ON COLUMN "T_FENCE_INOUT_LOG"."LATITUDE" IS '纬度';

COMMENT ON COLUMN "T_FENCE_INOUT_LOG"."DISTANCE" IS '半径';

COMMENT ON COLUMN "T_FENCE_INOUT_LOG"."UNIT" IS '单位';

COMMENT ON COLUMN "T_FENCE_INOUT_LOG"."OCCURTIME" IS '发生时间';

COMMENT ON COLUMN "T_FENCE_INOUT_LOG"."CREATETIME" IS '记录创建的时间';

COMMENT ON COLUMN "T_FENCE_INOUT_LOG"."FENCETYPE" IS '策略类型';

COMMENT ON COLUMN "T_FENCE_INOUT_LOG"."UPDATESTATUS" IS '更新状态(0：未更新，1：已更新)';

COMMENT ON COLUMN "T_FENCE_INOUT_LOG"."INOUTTYPE" IS '引起进出围栏的原因：0-设备移动;1-删除;2-下发';

COMMENT ON COLUMN "T_FENCE_INOUT_LOG"."ISGEOFENCETYPE" IS '引起进出围栏的原因是不是地里围栏：0-是，1-否';

COMMENT ON TABLE "T_FENCE" IS '围栏信息表';

COMMENT ON COLUMN "T_FENCE"."ID" IS '自增主键';

COMMENT ON COLUMN "T_FENCE"."NAME" IS '围栏名称';

COMMENT ON COLUMN "T_FENCE"."TYPE" IS '围栏类型 1-时间围栏 2- 地理围栏';

COMMENT ON COLUMN "T_FENCE"."DESCR" IS '描述';

COMMENT ON COLUMN "T_FENCE"."TIMEZONE" IS '时区';

COMMENT ON COLUMN "T_FENCE"."BEGINDATE" IS '开始日期';

COMMENT ON COLUMN "T_FENCE"."ENDDATE" IS '结束日期';

COMMENT ON COLUMN "T_FENCE"."LONGITUDE" IS '经度';

COMMENT ON COLUMN "T_FENCE"."LATITUDE" IS '纬度';

COMMENT ON COLUMN "T_FENCE"."DISTANCE" IS '距离范围';

COMMENT ON COLUMN "T_FENCE"."UNIT" IS '距离单位 1-km 2- mile';

COMMENT ON COLUMN "T_FENCE"."CREATOR" IS '创建人';

COMMENT ON COLUMN "T_FENCE"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_FENCE"."UPDATETIME" IS '变更时间';

COMMENT ON TABLE "T_EXCEPTION" IS '异常记录表';

COMMENT ON COLUMN "T_EXCEPTION"."ID" IS 'id';

COMMENT ON COLUMN "T_EXCEPTION"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_EXCEPTION"."EXCEPTIONTYPE" IS '异常类型.201—Android设备异常退出激活;';

COMMENT ON COLUMN "T_EXCEPTION"."CREATETIME" IS '创建时间';

COMMENT ON TABLE "T_ENTRANCE_GUARD_PUSH" IS '门禁信息推送表';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_PUSH"."ID" IS '推送id';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_PUSH"."GUARDIDS" IS '门禁ids';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_PUSH"."GUARDGROUPID" IS '门禁组id';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_PUSH"."LOGINID" IS '创建人';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_PUSH"."DEVICERELATIONSHIP" IS '推送设备所属关系（企业-1、员工-2、其他-3、全部-0）默认全部';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_PUSH"."CREATETIME" IS '创建时间';

CREATE INDEX "GUARDID"
ON "T_ENTRANCE_GUARD_PUG"("GUARDID");

COMMENT ON TABLE "T_ENTRANCE_GUARD_PUG" IS '门禁信息分发用户组关联表';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_PUG"."GUARDID" IS '门禁id';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_PUG"."GROUPID" IS '用户组';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_PUG"."GUARDPUSHID" IS '门禁信息推送ID';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_PUG"."CREATETIME" IS '创建时间';

CREATE INDEX "GUARDPUSHID"
ON "T_ENTRANCE_GUARD_PU"("GUARDPUSHID");

COMMENT ON TABLE "T_ENTRANCE_GUARD_PU" IS '门禁信息分发用户关联表';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_PU"."GUARDID" IS '门禁id';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_PU"."USERID" IS '用户';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_PU"."GUARDPUSHID" IS '门禁信息推送ID';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_PU"."CREATETIME" IS '创建时间';

CREATE INDEX "IDX_TEGL_DEVICEID"
ON "T_ENTRANCE_GUARD_LOG"("DEVICEID");

COMMENT ON TABLE "T_ENTRANCE_GUARD_LOG" IS '门禁日志表';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_LOG"."DEVICEID" IS '设备ID';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_LOG"."UDID" IS '设备udid';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_LOG"."USERID" IS '用户ID';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_LOG"."GUARDDATA" IS '门禁信息';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_LOG"."OPER" IS '进出标识(门禁信息后2位)00进 01 出';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_LOG"."OPERTIME" IS '进出门禁刷卡时间';

COMMENT ON TABLE "T_ENTRANCE_GUARD_GROUP" IS '门禁组表';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_GROUP"."GUARDGROUPNAME" IS '门禁组组名';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_GROUP"."REMARK" IS '备注';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_GROUP"."STATUS" IS '门禁组状态 1-有效 0-无效  -1-删除';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_GROUP"."LOGINID" IS '创建人';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_GROUP"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_GROUP"."UPDATETIME" IS '更新时间';

CREATE INDEX "IDX_TEGD_DEVICEID"
ON "T_ENTRANCE_GUARD_DEVICE"("DEVICEID");

CREATE INDEX "IDX_TEGD_GUARDID"
ON "T_ENTRANCE_GUARD_DEVICE"("GUARDID");

CREATE INDEX "IDX_TEGD_STATUS"
ON "T_ENTRANCE_GUARD_DEVICE"("STATUS");

COMMENT ON TABLE "T_ENTRANCE_GUARD_DEVICE" IS '门禁信息分发设备关联表';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_DEVICE"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_DEVICE"."GUARDID" IS '门禁id';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_DEVICE"."GUARDPUSHID" IS '门禁信息推送ID';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_DEVICE"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_DEVICE"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_ENTRANCE_GUARD_DEVICE"."STATUS" IS '执行状态,0--已分发;1--已应用';

COMMENT ON TABLE "T_ENTRANCE_GUARD" IS '门禁信息表';

COMMENT ON COLUMN "T_ENTRANCE_GUARD"."GUARDNAME" IS '门禁名称';

COMMENT ON COLUMN "T_ENTRANCE_GUARD"."GUARDDATA" IS '门禁信息';

COMMENT ON COLUMN "T_ENTRANCE_GUARD"."GUARDGROUPID" IS '门禁组id';

COMMENT ON COLUMN "T_ENTRANCE_GUARD"."STATUS" IS '门禁状态 1-有效 0-无效 -1-删除';

COMMENT ON COLUMN "T_ENTRANCE_GUARD"."LOGINID" IS '创建人';

COMMENT ON COLUMN "T_ENTRANCE_GUARD"."REMARK" IS '备注';

COMMENT ON COLUMN "T_ENTRANCE_GUARD"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_ENTRANCE_GUARD"."UPDATETIME" IS '更新时间';

CREATE INDEX "TEMMPASSTOKEN_HOSTID_APPID"
ON "T_EMM_TOKEN"("HOST_ID","APP_ID");

CREATE INDEX "TEMMPINCODE_PRINCIPLE_MODE"
ON "T_EMM_PINCODE"("PRINCIPLE","PINCODE_MODE");

COMMENT ON COLUMN "T_EMM_PINCODE"."STATUS" IS '"CREATED", "USED"';

CREATE INDEX "IDX_T_EMM_CLIENT_LOGIN_LOGINID"
ON "T_EMM_CLIENT_LOGIN"("LOGINID");

COMMENT ON COLUMN "T_EMM_CLIENT_LOGIN"."STATUS" IS 'logout，login';

CREATE INDEX "T_DYNAMIC_LABEL_USER_IDFK_IDX"
ON "T_DYNAMIC_LABEL_USER"("LABELID");

COMMENT ON TABLE "T_DYNAMIC_LABEL_USER" IS '动态标签用户表';

COMMENT ON COLUMN "T_DYNAMIC_LABEL_USER"."LABELID" IS '标签Id';

COMMENT ON COLUMN "T_DYNAMIC_LABEL_USER"."PARAMNAME" IS '标签参数名称:1:选择用户、用户组 2:设备归属 3:OS版本 4:品牌型号 5:运营商 6:运营商 7:设备状态 8:上次在线时间';

COMMENT ON COLUMN "T_DYNAMIC_LABEL_USER"."PARAMVALUE" IS '标签参数值';

COMMENT ON TABLE "T_DOC_GROUP_VERSION" IS '组文档版本表';

COMMENT ON COLUMN "T_DOC_GROUP_VERSION"."GROUPID" IS '组id';

COMMENT ON TABLE "T_DOCUMENT_USER_VERSION" IS '用户文档版本表';

COMMENT ON COLUMN "T_DOCUMENT_USER_VERSION"."USERID" IS '用户id';

COMMENT ON TABLE "T_DOCUMENT_TAG_USER" IS '文档标签用户关联表';

COMMENT ON COLUMN "T_DOCUMENT_TAG_LINK"."DOCID" IS '文档id';

COMMENT ON COLUMN "T_DOCUMENT_TAG_LINK"."TAGID" IS '标签id';

COMMENT ON COLUMN "T_DOCUMENT_TAG_LINK"."DISTRIBUTE" IS '是否推送通知:  0 分发 1 不分发 默认 0 ';

COMMENT ON COLUMN "T_DOCUMENT_TAG_LINK"."OPERTYPE" IS '操作类型: 0 预览、1 下载、2 分享 默认0';

COMMENT ON TABLE "T_DOCUMENT_TAG_GROUP" IS '文档标签表';

COMMENT ON TABLE "T_DOCUMENT_TAG" IS '文档标签表';

COMMENT ON COLUMN "T_DOCUMENT_TAG"."NAME" IS '标签名称';

COMMENT ON COLUMN "T_DOCUMENT_TAG"."DESCRIPTION" IS '描述';

COMMENT ON COLUMN "T_DOCUMENT_TAG"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_DOCUMENT_TAG"."UPDATETIME" IS '修改时间';

COMMENT ON COLUMN "T_DOCUMENT_TAG"."TYPE" IS '标签类型: 0 内置标签 1 自定义';

COMMENT ON TABLE "T_DOCUMENT_STATISTICS" IS '统计信息表(供dashboard统计用)';

COMMENT ON COLUMN "T_DOCUMENT_STATISTICS"."ID" IS 'id';

COMMENT ON COLUMN "T_DOCUMENT_STATISTICS"."BASEYMD" IS '日期: 格式 2013-04-19';

COMMENT ON COLUMN "T_DOCUMENT_STATISTICS"."FILEID" IS '文件id';

COMMENT ON COLUMN "T_DOCUMENT_STATISTICS"."OPERTYPE" IS '操作类型: 0 预览  , 1 下载  , 2 上传';

COMMENT ON COLUMN "T_DOCUMENT_STATISTICS"."OPERCOUNT" IS '操作次数';

COMMENT ON COLUMN "T_DOCUMENT_STATISTICS"."CREATETIME" IS '创建时间';

COMMENT ON TABLE "T_DOCUMENT_OPER_LOG" IS '文件操作日志';

COMMENT ON COLUMN "T_DOCUMENT_OPER_LOG"."ID" IS 'id';

COMMENT ON COLUMN "T_DOCUMENT_OPER_LOG"."FILEID" IS '文件id';

COMMENT ON COLUMN "T_DOCUMENT_OPER_LOG"."OPERTYPE" IS '操作类型: 0  预览   , 1  下载   , 2  上传';

COMMENT ON COLUMN "T_DOCUMENT_OPER_LOG"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_DOCUMENT_OPER_LOG"."OPERBY" IS '操作人';

COMMENT ON TABLE "T_DOCUMENT_LOG" IS '文档操作记录';

COMMENT ON COLUMN "T_DOCUMENT_LOG"."DOCID" IS '文档id';

COMMENT ON COLUMN "T_DOCUMENT_LOG"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_DOCUMENT_LOG"."OPERTYPE" IS '操作类型: 0 预览、1 下载、2 分享 默认0';

COMMENT ON COLUMN "T_DOCUMENT_LOG"."CREATETIME" IS '创建时间';

COMMENT ON TABLE "T_DOCUMENT" IS '文档管理表';

COMMENT ON COLUMN "T_DOCUMENT"."NAME" IS '文件名';

COMMENT ON COLUMN "T_DOCUMENT"."URL" IS 'url路径';

COMMENT ON COLUMN "T_DOCUMENT"."ICON" IS '图标';

COMMENT ON COLUMN "T_DOCUMENT"."DESCRIPTION" IS '描述';

COMMENT ON COLUMN "T_DOCUMENT"."TYPE" IS '类型: 0 pdf, 1 numbers, 2 pages, 3 keynote, 4 word, 5 powerpoint,  6 excel,  7 html,  8 xml, 9 text, 10image';

COMMENT ON COLUMN "T_DOCUMENT"."TAGID" IS '标签id';

COMMENT ON COLUMN "T_DOCUMENT"."STATUS" IS '状态';

COMMENT ON COLUMN "T_DOCUMENT"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_DOCUMENT"."UPDATETIME" IS '修改时间';

COMMENT ON COLUMN "T_DOCUMENT"."CREATEBY" IS '创建人';

COMMENT ON COLUMN "T_DOCUMENT"."UPDATEBY" IS '修改人';

COMMENT ON TABLE "T_DEVICE_WRAPAPP" IS 'iOS设备wrappingapp配置表';

COMMENT ON COLUMN "T_DEVICE_WRAPAPP"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_DEVICE_WRAPAPP"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_DEVICE_WRAPAPP"."FORBIDDENAPP" IS '启用APP包名';

COMMENT ON TABLE "T_DEVICE_WECHAT_LOG" IS '微信审计操作日志表';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LOG"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LOG"."IMEI" IS 'imei:international mobile equipment identity';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LOG"."ACCOUNT" IS '微信账号';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LOG"."NAME" IS '微信姓名';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LOG"."TYPE" IS '登录登出类型(1:登录,0:登出)';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LOG"."LOGINTIME" IS '登录时间';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LOG"."LOGOUTTIME" IS '登出时间';

COMMENT ON TABLE "T_DEVICE_WECHAT_LINKMAN" IS '设备微信联系人信息表';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LINKMAN"."DEVICEWECHATID" IS '本机微信';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LINKMAN"."VERSION" IS '版本';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LINKMAN"."ACCOUNT" IS '联系人账号';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LINKMAN"."NAME" IS '联系人姓名';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LINKMAN"."HEADPORTRAIT" IS '联系人头像';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LINKMAN"."AUTOGRAPH" IS '联系人个性签名';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LINKMAN"."PROVINCE" IS '联系人省份';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LINKMAN"."AREA" IS '联系人地区';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LINKMAN"."SOURCE" IS '联系人来源';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LINKMAN"."QRCODE" IS '联系人二维码';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LINKMAN"."SEX" IS '联系人性别';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LINKMAN"."REMARK" IS '联系人备注';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LINKMAN"."BLACKLIST" IS '是否加入黑名单';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LINKMAN"."STARFRIEND" IS '是否星标朋友';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LINKMAN"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_DEVICE_WECHAT_LINKMAN"."UPDATETIME" IS '更新时间';

COMMENT ON TABLE "T_DEVICE_WECHAT" IS '设备微信账号信息表';

COMMENT ON COLUMN "T_DEVICE_WECHAT"."DEVICEID" IS '设备ID';

COMMENT ON COLUMN "T_DEVICE_WECHAT"."VERSION" IS '版本';

COMMENT ON COLUMN "T_DEVICE_WECHAT"."IMEI" IS 'imei:international mobile equipment identity';

COMMENT ON COLUMN "T_DEVICE_WECHAT"."ACCOUNT" IS '微信账号';

COMMENT ON COLUMN "T_DEVICE_WECHAT"."NAME" IS '微信姓名';

COMMENT ON COLUMN "T_DEVICE_WECHAT"."HEADPORTRAIT" IS '微信头像';

COMMENT ON COLUMN "T_DEVICE_WECHAT"."AUTOGRAPH" IS '微信个性签名';

COMMENT ON COLUMN "T_DEVICE_WECHAT"."PROVINCE" IS '微信省份';

COMMENT ON COLUMN "T_DEVICE_WECHAT"."AREA" IS '微信地区';

COMMENT ON COLUMN "T_DEVICE_WECHAT"."QRCODE" IS '微信二维码';

COMMENT ON COLUMN "T_DEVICE_WECHAT"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_DEVICE_WECHAT"."UPDATETIME" IS '更新时间';

COMMENT ON TABLE "T_DEVICE_USING_LOG" IS '设备使用日志表';

COMMENT ON COLUMN "T_DEVICE_USING_LOG"."IMSI" IS 'imsi:international mobile subscriber identity';

COMMENT ON COLUMN "T_DEVICE_USING_LOG"."OPERATORNAME" IS '运营商名称';

COMMENT ON COLUMN "T_DEVICE_USING_LOG"."PHONECODE" IS '手机号码';

COMMENT ON COLUMN "T_DEVICE_USING_LOG"."SIMCHANGEINFO" IS 'sim变更信息';

COMMENT ON COLUMN "T_DEVICE_USING_LOG"."SIMCARDFLOW" IS 'sim卡流量(kb)';

COMMENT ON COLUMN "T_DEVICE_USING_LOG"."WLANFLOW" IS 'wlan流量(kb)';

COMMENT ON COLUMN "T_DEVICE_USING_LOG"."CREATETIME" IS '日志创建时间';

CREATE INDEX "T_DEVICE_USERCHECKIN_INDEX"
ON "T_DEVICE_USERCHECKIN"("USERID","DEVICEID","OCCUREDDATE");

COMMENT ON COLUMN "T_DEVICE_TRAFFIC"."ID" IS 'id';

COMMENT ON COLUMN "T_DEVICE_TRAFFIC"."LOGINID" IS '用户帐号';

COMMENT ON COLUMN "T_DEVICE_TRAFFIC"."UDID" IS '设备udid';

COMMENT ON COLUMN "T_DEVICE_TRAFFIC"."ENDTIME" IS '统计截止时间';

COMMENT ON COLUMN "T_DEVICE_TRAFFIC"."SIMTRAFFIC" IS 'sim1日流量';

COMMENT ON COLUMN "T_DEVICE_TRAFFIC"."WIFITRAFFIC" IS 'wifi日流量';

COMMENT ON COLUMN "T_DEVICE_TRAFFIC"."MOBILE" IS '手机号';

COMMENT ON COLUMN "T_DEVICE_TRAFFIC"."USERNAME" IS '用户名称';

COMMENT ON COLUMN "T_DEVICE_TRAFFIC"."DEVICENAME" IS '设备名称';

COMMENT ON COLUMN "T_DEVICE_TRAFFIC"."GROUPID" IS '组ID';

COMMENT ON COLUMN "T_DEVICE_TRAFFIC"."RELATIONSHIP" IS '所属关系';

COMMENT ON COLUMN "T_DEVICE_TRAFFIC"."PLATFORMTYPE" IS '平台类型';

COMMENT ON TABLE "T_DEVICE_TMP" IS '设备信息表uuid udid转换表';

COMMENT ON COLUMN "T_DEVICE_TMP"."USERID" IS '所属用户用户id';

COMMENT ON COLUMN "T_DEVICE_TMP"."UDID" IS 'unique device identifier';

COMMENT ON COLUMN "T_DEVICE_TMP"."IMEI" IS 'imei:international mobile equipment identity';

COMMENT ON COLUMN "T_DEVICE_TMP"."IMSI" IS 'imsi:international mobile subscriber identity';

COMMENT ON COLUMN "T_DEVICE_TMP"."BUYTIME" IS '购买时间';

COMMENT ON COLUMN "T_DEVICE_TMP"."WARRANTY" IS '保修期';

COMMENT ON COLUMN "T_DEVICE_TMP"."DEVICETYPE" IS '设备类型 10--android phone/android pad;20--iphone/ipod touch;21-ipad/ipad mini';

COMMENT ON COLUMN "T_DEVICE_TMP"."TYPE" IS '平台1--android;2--ios';

COMMENT ON COLUMN "T_DEVICE_TMP"."RELATIONSHIP" IS '设备所属关系  1--公司设备;2--员工设备;3--其他';

COMMENT ON COLUMN "T_DEVICE_TMP"."DEVICENAME" IS '设备名称';

COMMENT ON COLUMN "T_DEVICE_TMP"."DEVICENUMBER" IS '设备编号';

COMMENT ON COLUMN "T_DEVICE_TMP"."SERIALNUM" IS '设备序列号';

COMMENT ON COLUMN "T_DEVICE_TMP"."MANUFACTURER" IS '设备厂商';

COMMENT ON COLUMN "T_DEVICE_TMP"."MODEL" IS '设备型号';

COMMENT ON COLUMN "T_DEVICE_TMP"."OS" IS '操作系统平台';

COMMENT ON COLUMN "T_DEVICE_TMP"."VERSIONUM" IS ' 版本号';

COMMENT ON COLUMN "T_DEVICE_TMP"."PHONECODE" IS '手机号码';

COMMENT ON COLUMN "T_DEVICE_TMP"."ROMCAPACITY" IS 'rom 总容量';

COMMENT ON COLUMN "T_DEVICE_TMP"."ROMAVAILABLECAPACITY" IS 'rom 可用空间';

COMMENT ON COLUMN "T_DEVICE_TMP"."SDCAPACITY" IS 'sd卡容量';

COMMENT ON COLUMN "T_DEVICE_TMP"."SDAVAILABLECAPACITY" IS 'sd卡可用空间';

COMMENT ON COLUMN "T_DEVICE_TMP"."SDSERIALNUM" IS 'sd卡序列号';

COMMENT ON COLUMN "T_DEVICE_TMP"."CAMERA" IS '摄像头';

COMMENT ON COLUMN "T_DEVICE_TMP"."WIFIMAC" IS 'wifi mac地址';

COMMENT ON COLUMN "T_DEVICE_TMP"."BLUETOOTHMAC" IS '蓝牙 mac地址';

COMMENT ON COLUMN "T_DEVICE_TMP"."POWERSTATUS" IS '电源状态';

COMMENT ON COLUMN "T_DEVICE_TMP"."BOOTTIME" IS '开机时长';

COMMENT ON COLUMN "T_DEVICE_TMP"."CAPACITY" IS '存储容量(ios)';

COMMENT ON COLUMN "T_DEVICE_TMP"."CAPACITYSTATUS" IS '存储容量状态(ios)';

COMMENT ON COLUMN "T_DEVICE_TMP"."AVAILABLECAPACITY" IS '可用空间(ios)';

COMMENT ON COLUMN "T_DEVICE_TMP"."IP" IS 'ip地址';

COMMENT ON COLUMN "T_DEVICE_TMP"."ENCRYPTIONLEVEL" IS '加密级别';

COMMENT ON COLUMN "T_DEVICE_TMP"."ROOTFLAG" IS '是否破解root, 0--未破解 ;1--破解 ';

COMMENT ON COLUMN "T_DEVICE_TMP"."LASTONLINETIME" IS '最后在线时间';

COMMENT ON COLUMN "T_DEVICE_TMP"."ONLINEFLAG" IS '设备是否在线 0--在线;1--不在线';

COMMENT ON COLUMN "T_DEVICE_TMP"."JAILBREAKFLAG" IS '设备是否越狱 0--否;1--是';

COMMENT ON COLUMN "T_DEVICE_TMP"."STATUS" IS '设备状态,0--淘汰,1--注册未激活,2--激活可用, 3--保留 4--擦除，5待擦除，6待淘汰';

COMMENT ON COLUMN "T_DEVICE_TMP"."REGISTTIME" IS '注册时间';

COMMENT ON COLUMN "T_DEVICE_TMP"."ACTIVATETIME" IS '激活时间';

COMMENT ON COLUMN "T_DEVICE_TMP"."TOKEN" IS 'ios mdm发送唤醒使用';

COMMENT ON COLUMN "T_DEVICE_TMP"."PUSHMAGIC" IS 'ios mdm发送唤醒使用';

COMMENT ON COLUMN "T_DEVICE_TMP"."UNLOCKTOKEN" IS 'ios mdm解除锁屏使用';

COMMENT ON COLUMN "T_DEVICE_TMP"."CHALLENGE" IS 'ios mdm激活使用';

COMMENT ON COLUMN "T_DEVICE_TMP"."SENDREGISTNOTICEFLAG" IS '是否发送注册通知信息,0--否;1--是';

COMMENT ON COLUMN "T_DEVICE_TMP"."ALLOWACTROOTORJAILBREAKFLAG" IS '是否允许root/越狱设备激活,0--否;1--是';

COMMENT ON COLUMN "T_DEVICE_TMP"."REMARK" IS '备注';

COMMENT ON COLUMN "T_DEVICE_TMP"."ROAMINGFLAG" IS '设备漫游开关 0--否;1--是';

COMMENT ON COLUMN "T_DEVICE_TMP"."UPDATETIME" IS '设备信息更新时间';

COMMENT ON COLUMN "T_DEVICE_TMP"."APNSTOKEN" IS 'apns的设备token';

COMMENT ON COLUMN "T_DEVICE_TMP"."LOSTFLAG" IS '是否丢失：0 --未丢失，1 --丢失';

COMMENT ON COLUMN "T_DEVICE_TMP"."DATAENCRYPTIONFLAG" IS '是否开启数据加密.0--否;1--是';

COMMENT ON COLUMN "T_DEVICE_TMP"."SPECIALTYPEFLAG" IS '特殊设备类型标识.0--普通设备;100--samsung safe设备;101--samsung knox设备';

COMMENT ON COLUMN "T_DEVICE_TMP"."PAUSEFLAG" IS '设备暂停标识：0 正常   / 1 暂停';

COMMENT ON COLUMN "T_DEVICE_SYSEVENT_LOG"."UDID" IS '1.System Time 2.GPS On/Off';

COMMENT ON COLUMN "T_DEVICE_SYSEVENT_LOG"."EVENTRESULT" IS '修改后的结果';

COMMENT ON TABLE "T_DEVICE_STATUS" IS '设备状态表';

COMMENT ON COLUMN "T_DEVICE_STATUS"."ID" IS 'id';

COMMENT ON COLUMN "T_DEVICE_STATUS"."UDID" IS 'unique device identifier';

COMMENT ON COLUMN "T_DEVICE_STATUS"."COMPONENTTYPE" IS '业务类型：1-mem;2-mcm;3-mam';

COMMENT ON COLUMN "T_DEVICE_STATUS"."STATUS" IS '设备状态：0-暂停;1-禁用';

COMMENT ON COLUMN "T_DEVICE_STATUS"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_DEVICE_STATUS"."UPDATETIME" IS '修改时间';

COMMENT ON COLUMN "T_DEVICE_STATUS"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_DEVICE_STATUS"."VIOLATIONID" IS '违规 id';

COMMENT ON COLUMN "T_DEVICE_SECURITYINFO"."HARDWAREENCRYPTIONCAPS" IS '1--block-level encryption.2--file-level encryption.';

COMMENT ON COLUMN "T_DEVICE_SECURITYINFO"."PASSCODEPRESENT" IS '0--false,1--true 是否受密码保护';

COMMENT ON COLUMN "T_DEVICE_SECURITYINFO"."PASSCODECOMPLIANT" IS '0--false,1--true 其它帐号是否需要用户的密码';

COMMENT ON COLUMN "T_DEVICE_SECURITYINFO"."PASSCODECOMPLIANTWITHPROFILES" IS '0--false,1--true 配置文件是否需要用户的密码';

COMMENT ON COLUMN "T_DEVICE_SAMSUNG"."ID" IS 'id';

COMMENT ON COLUMN "T_DEVICE_SAMSUNG"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_DEVICE_SAMSUNG"."BLUETOOTHSTATUS" IS '蓝牙状态 0--禁止;1--启用';

COMMENT ON COLUMN "T_DEVICE_SAMSUNG"."CAMERASTATUS" IS '摄像头状态  0--禁止;1--启用';

COMMENT ON COLUMN "T_DEVICE_SAMSUNG"."MICROPHONESTATUS" IS '麦克风状态 0--禁止;1--启用';

COMMENT ON COLUMN "T_DEVICE_SAMSUNG"."WIFISTATUS" IS 'wi-fi状态 0--禁止;1--启用';

COMMENT ON COLUMN "T_DEVICE_SAMSUNG"."NFCSTATUS" IS 'nfc状态 0--禁止;1--启用';

COMMENT ON COLUMN "T_DEVICE_SAMSUNG"."SDCARDSTATUS" IS 'sd卡状态 0--禁止;1--启用';

COMMENT ON COLUMN "T_DEVICE_SAMSUNG"."GPSSTATUS" IS 'gps状态 0--关闭;1--开启';

COMMENT ON COLUMN "T_DEVICE_SAMSUNG"."CELLULARDATASTATUS" IS '蜂窝数据状态 0--禁止;1--启用';

COMMENT ON COLUMN "T_DEVICE_SAMSUNG"."ROAMINGDATASTATUS" IS '数据漫游状态 0--禁止;1--启用';

COMMENT ON COLUMN "T_DEVICE_SAMSUNG"."ROAMINGPUSHSTATUS" IS 'push消息状态 0--禁止;1--启用';

COMMENT ON COLUMN "T_DEVICE_SAMSUNG"."ROAMINGSYNCSTATUS" IS '漫游同步状态 0--禁止;1--启用';

COMMENT ON COLUMN "T_DEVICE_SAMSUNG"."ROAMINGVOICECALLSSTATUS" IS '语音漫游状态 0--禁止;1--启用';

COMMENT ON TABLE "T_DEVICE_REMOTECONTROL" IS '设备远程控制指令表';

COMMENT ON COLUMN "T_DEVICE_REMOTECONTROL"."UUID" IS '指令uuid';

COMMENT ON COLUMN "T_DEVICE_REMOTECONTROL"."PARAMCONTENT" IS '指令参数';

COMMENT ON COLUMN "T_DEVICE_REMOTECONTROL"."OPERTYPE" IS '操作类型 0:锁机;21--清除密码;22--设备更新,23--设备定位,24--播放铃声,25--设备擦除,26--选择性擦除';

COMMENT ON COLUMN "T_DEVICE_REMOTECONTROL"."CREATETIME" IS '指令下发时间';

COMMENT ON COLUMN "T_DEVICE_REMOTECONTROL"."UPDATETIME" IS '执行完成更新时间';

COMMENT ON COLUMN "T_DEVICE_REMOTECONTROL"."STATUS" IS '执行状态,0:指令下发未执行;1:执行成功;21--执行失败';

CREATE INDEX "CREATE_TIME"
ON "T_DEVICE_PWD"("CREATE_TIME");

CREATE INDEX "UDID_UUID_INDEX"
ON "T_DEVICE_PWD"("UDID","UUID");

COMMENT ON TABLE "T_DEVICE_PWD" IS '设备密码表';

COMMENT ON COLUMN "T_DEVICE_PWD"."ID" IS '主键ID';

COMMENT ON COLUMN "T_DEVICE_PWD"."UUID" IS '流水ID';

COMMENT ON COLUMN "T_DEVICE_PWD"."UDID" IS '设备udid';

COMMENT ON COLUMN "T_DEVICE_PWD"."STATUS" IS '-1，已删除
1，设置中
2，已设置';

COMMENT ON COLUMN "T_DEVICE_PWD"."CREATE_TIME" IS '创建时间';

COMMENT ON COLUMN "T_DEVICE_PWD"."UPDATE_TIME" IS '更新时间';

CREATE INDEX "IDX_PROFILE_POLICYID"
ON "T_DEVICE_PROFILE"("POLICYID");

COMMENT ON TABLE "T_DEVICE_PROFILE" IS '设备与配置文件策略关联表';

COMMENT ON COLUMN "T_DEVICE_PROFILE"."POLICYID" IS '配置文件uuid';

COMMENT ON COLUMN "T_DEVICE_PROFILE"."CREATETIME" IS '下发时间';

COMMENT ON COLUMN "T_DEVICE_PROFILE"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_DEVICE_PROFILE"."STATUS" IS '执行状态,0--已分发;1--已安装;21--安装失败';

COMMENT ON COLUMN "T_DEVICE_PROFILE"."FENCESTATUS" IS '围栏状态：0、围栏外；1、围栏内';

COMMENT ON COLUMN "T_DEVICE_POSITION"."PULLTIME" IS '接收时间';

COMMENT ON COLUMN "T_DEVICE_POSITION"."LONGITUDE" IS '经度';

COMMENT ON COLUMN "T_DEVICE_POSITION"."LATITUDE" IS '纬度';

COMMENT ON COLUMN "T_DEVICE_POSITION"."ADDRESS" IS '地理位置';

COMMENT ON COLUMN "T_DEVICE_POSITION"."LOGINID" IS '用户信息';

COMMENT ON COLUMN "T_DEVICE_POSITION"."PKGNAME" IS '应用包名';

COMMENT ON COLUMN "T_DEVICE_POSITION"."PLATFORM" IS '适合平台 0：表示其它，1：表示android, 2:表示ios，默认是1';

COMMENT ON COLUMN "T_DEVICE_POSITION"."APPNAME" IS '应用名称';

COMMENT ON COLUMN "T_DEVICE_POSITION"."DESCRIPTION" IS '操作类型说明';

COMMENT ON TABLE "T_DEVICE_OPER_LOG" IS '设备操作(注册、激活、淘汰)日志表';

COMMENT ON COLUMN "T_DEVICE_OPER_LOG"."USERID" IS '用户id';

COMMENT ON COLUMN "T_DEVICE_OPER_LOG"."LOGINID" IS '用户名';

COMMENT ON COLUMN "T_DEVICE_OPER_LOG"."NAME" IS '真实姓名';

COMMENT ON COLUMN "T_DEVICE_OPER_LOG"."OPERTYPE" IS '动作,0--注册;1--激活;-1--淘汰';

COMMENT ON COLUMN "T_DEVICE_OPER_LOG"."OPERTIME" IS '操作时间';

COMMENT ON COLUMN "T_DEVICE_OPER_LOG"."DEVICENAME" IS '设备名称';

COMMENT ON COLUMN "T_DEVICE_OPER_LOG"."SERIALNUM" IS '设备序列号';

COMMENT ON COLUMN "T_DEVICE_OPER_LOG"."REMARKS" IS '备注';

COMMENT ON TABLE "T_DEVICE_NETWORK_LOG" IS '设备联网异常表';

COMMENT ON COLUMN "T_DEVICE_NETWORK_LOG"."ID" IS '系统ID';

COMMENT ON COLUMN "T_DEVICE_NETWORK_LOG"."USERID" IS '用户ID';

COMMENT ON COLUMN "T_DEVICE_NETWORK_LOG"."USERNAME" IS '用户名';

COMMENT ON COLUMN "T_DEVICE_NETWORK_LOG"."MOBILE" IS '手机';

COMMENT ON COLUMN "T_DEVICE_NETWORK_LOG"."UDID" IS '设备udid';

COMMENT ON COLUMN "T_DEVICE_NETWORK_LOG"."DEVICENAME" IS '设备名称';

COMMENT ON COLUMN "T_DEVICE_NETWORK_LOG"."CREATETIME" IS '上报时间';

COMMENT ON COLUMN "T_DEVICE_MSG"."ID" IS '短信id';

COMMENT ON COLUMN "T_DEVICE_MSG"."UDID" IS '设备id';

COMMENT ON COLUMN "T_DEVICE_MSG"."MSGTYPE" IS '短信状态，0发送，1接收';

COMMENT ON COLUMN "T_DEVICE_MSG"."SMSTYPE" IS '短信类型，0短信，1彩信';

COMMENT ON COLUMN "T_DEVICE_MSG"."ORIGINALNO" IS '发送方电话号码';

COMMENT ON COLUMN "T_DEVICE_MSG"."TERMINALNO" IS '接收方电话号码';

COMMENT ON COLUMN "T_DEVICE_MSG"."HAPPENTIME" IS '发送或接收的时间';

COMMENT ON COLUMN "T_DEVICE_MSG"."CONTENT" IS '短信内容';

COMMENT ON COLUMN "T_DEVICE_MSG"."LOGINID" IS '用户帐号';

COMMENT ON COLUMN "T_DEVICE_MSG"."USERNAME" IS '用户名称';

COMMENT ON COLUMN "T_DEVICE_MSG"."DEVICENAME" IS '设备名称';

COMMENT ON COLUMN "T_DEVICE_MSG"."GROUPID" IS '组ID';

COMMENT ON COLUMN "T_DEVICE_MSG"."RELATIONSHIP" IS '所属关系';

COMMENT ON COLUMN "T_DEVICE_MSG"."PLATFORMTYPE" IS '平台类型';

COMMENT ON TABLE "T_DEVICE_MODEL" IS '设备型号信息表';

COMMENT ON COLUMN "T_DEVICE_MODEL"."MODEL" IS '设备型号';

COMMENT ON COLUMN "T_DEVICE_MODEL"."TYPE" IS '设备类型  1--android;2--ios';

COMMENT ON COLUMN "T_DEVICE_MODEL"."PICTUREPATH" IS '设备图片路径';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."ID" IS 'id';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."UDID" IS '设备id';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."LOGINID" IS '用户帐号';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."USERNAME" IS '用户名称';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."DEVICENAME" IS '设备名称';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."GROUPID" IS '组ID';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."RELATIONSHIP" IS '所属关系';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."PLATFORMTYPE" IS '平台类型';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."PRODUCTNAME" IS '设备型号码 ,例如：iPhone3,1';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."MODEL" IS '设备型号,例如：MC319LL';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."OS" IS '操作系统平台';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."VERSIONNUM" IS ' 版本号';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."SERIALNUM" IS '设备序列号';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."REGISTTIME" IS '注册时间';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."ACTIVATETIME" IS '激活时间';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."STATUS" IS '设备状态,0--淘汰,1--注册未激活,2--激活可用, 3--保留 4--擦除，5待擦除，6待淘汰';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."ROOTFLAG" IS '是否破解root, 0--未破解 ;1--破解 ';

COMMENT ON COLUMN "T_DEVICE_HISTORY"."JAILBREAKFLAG" IS '设备是否越狱 0--否;1--是';

COMMENT ON COLUMN "T_DEVICE_FILE_STATUS"."DEVICENUMBER" IS '设备编号';

COMMENT ON COLUMN "T_DEVICE_FILE_STATUS"."SYSTEMID" IS '请求系统标识';

COMMENT ON COLUMN "T_DEVICE_FILE_STATUS"."CREATETIME" IS '请求时间';

COMMENT ON TABLE "T_DEVICE_EXCEPTION" IS '用户设备绑定关系表';

COMMENT ON COLUMN "T_DEVICE_EXCEPTION"."ID" IS 'id';

COMMENT ON COLUMN "T_DEVICE_EXCEPTION"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_DEVICE_EXCEPTION"."USERID" IS '用户id';

COMMENT ON TABLE "T_DEVICE_DIAGNOSE_LOG" IS '远程诊断 日志上传表';

COMMENT ON COLUMN "T_DEVICE_DIAGNOSE_LOG"."FILENAME" IS 'id转换为字符串格式加上压缩扩展名';

COMMENT ON COLUMN "T_DEVICE_DIAGNOSE_LOG"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_DEVICE_DIAGNOSE_LOG"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_DEVICE_DIAGNOSE_LOG"."UPDATETIME" IS '修改时间';

COMMENT ON COLUMN "T_DEVICE_DIAGNOSE_LOG"."BEGINTIME" IS '起始时间';

COMMENT ON COLUMN "T_DEVICE_DIAGNOSE_LOG"."ENDTIME" IS '结束时间';

COMMENT ON COLUMN "T_DEVICE_DIAGNOSE_LOG"."WIFI" IS '是否只在wifi情况下下载 0:所有情况下载, 1:仅在wifi下下载  默认0';

COMMENT ON COLUMN "T_DEVICE_DIAGNOSE_LOG"."DEVICENAME" IS '设备名称';

COMMENT ON COLUMN "T_DEVICE_DIAGNOSE_LOG"."USERID" IS '用户id';

COMMENT ON COLUMN "T_DEVICE_DIAGNOSE_LOG"."GROUPID" IS '用户组id';

COMMENT ON COLUMN "T_DEVICE_DIAGNOSE_LOG"."PLATFORM" IS '适合平台  0:表示其它，1:表示android, 2:表示ios，默认是1 ';

COMMENT ON COLUMN "T_DEVICE_DIAGNOSE_LOG"."TRIGGERMODE" IS '触发模式  0:server请求, 1:client上报，默认是0 ';

COMMENT ON COLUMN "T_DEVICE_DIAGNOSE_LOG"."STATUS" IS '日志上传状态  0:等待上传, 1:上传成功, 2:上传失败，3:wifi限制，默认是0';

COMMENT ON COLUMN "T_DEVICE_DIAGNOSE_LOG"."PATH" IS '文件相对路径';

COMMENT ON COLUMN "T_DEVICE_DIAGNOSE_LOG"."OPERATOR" IS '操作者';

COMMENT ON COLUMN "T_DEVICE_DIAGNOSE_LOG"."TYPE" IS '日志类型 0-设备日志，1-拍照，2-截屏';

COMMENT ON COLUMN "T_DEVICE_CRYPTOMODULE"."RESULT" IS '0:查询成功 1:终端密码模块连接异常 2:终端密码模块状态异常 3:终端密码模块信息读取错误';

COMMENT ON COLUMN "T_DEVICE_CRYPTOMODULE"."MODULETYPE" IS '终端密码模块类型，包括但不限于tfcard、usbkey';

COMMENT ON COLUMN "T_DEVICE_CRYPTOMODULE"."MANUFACTURE" IS '终端密码模块生产厂商';

COMMENT ON COLUMN "T_DEVICE_CRYPTOMODULE"."MODULEID" IS '终端密码模块硬件编号';

COMMENT ON COLUMN "T_DEVICE_CRYPTOMODULE"."DEVICEID" IS '关联设备外键';

COMMENT ON TABLE "T_DEVICE_COLLECT" IS '采集设备信息表';

COMMENT ON COLUMN "T_DEVICE_COLLECT"."TYPE" IS '设备类型：1：安卓，2：iphone，3：其他';

COMMENT ON COLUMN "T_DEVICE_COLLECT"."MANUFACTURER" IS '设备厂商';

COMMENT ON COLUMN "T_DEVICE_COLLECT"."MODEL" IS '设备型号,例如：MC319LL';

COMMENT ON COLUMN "T_DEVICE_COLLECT"."VERSIONNUM" IS ' 版本号';

COMMENT ON COLUMN "T_DEVICE_COLLECT"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_DEVICE_COLLECT"."CREATETIME" IS '创建时间';

COMMENT ON TABLE "T_DEVICE_CMD_SEND_STATE" IS '设备远程控制指令表';

COMMENT ON COLUMN "T_DEVICE_CMD_SEND_STATE"."UUID" IS '指令uuid';

COMMENT ON COLUMN "T_DEVICE_CMD_SEND_STATE"."OPERTYPE" IS '操作类型 0:锁机;21--清除密码;22--设备更新,23--设备定位,24--播放铃声,25--设备擦除,26--选择性擦除';

COMMENT ON COLUMN "T_DEVICE_CMD_SEND_STATE"."STATUS" IS '执行状态,0:指令下发未执行;1:执行成功;21--执行失败';

COMMENT ON COLUMN "T_DEVICE_CMD_SEND_STATE"."PARAMCONTENT" IS '指令参数';

COMMENT ON COLUMN "T_DEVICE_CMD_SEND_STATE"."CREATETIME" IS '指令下发时间';

COMMENT ON COLUMN "T_DEVICE_CMD_SEND_STATE"."UPDATETIME" IS '执行完成更新时间';

CREATE INDEX "T_DEVICE_CHECK_DEVICE_CHECKID"
ON "T_DEVICE_CHECK_DEVICE"("CHECKID");

CREATE INDEX "T_DEVICE_CHECK_DEVICE_DEVICEID"
ON "T_DEVICE_CHECK_DEVICE"("DEVICEID");

COMMENT ON TABLE "T_DEVICE_CHECK_DEVICE" IS '设备验证与设备关联表';

COMMENT ON COLUMN "T_DEVICE_CHECK_DEVICE"."CHECKID" IS '验证信息id';

COMMENT ON COLUMN "T_DEVICE_CHECK_DEVICE"."DEVICEID" IS '设备id';

COMMENT ON TABLE "T_DEVICE_CHECK" IS '设备信息验证表';

COMMENT ON COLUMN "T_DEVICE_CHECK"."MANUFACTURER" IS '设备厂商';

COMMENT ON COLUMN "T_DEVICE_CHECK"."MODEL" IS '设备型号';

COMMENT ON COLUMN "T_DEVICE_CHECK"."UDID" IS 'unique device identifier';

COMMENT ON COLUMN "T_DEVICE_CHECK"."IMEI" IS 'imei:international mobile equipment identity';

COMMENT ON COLUMN "T_DEVICE_CHECK"."IMSI" IS 'imsi:international mobile subscriber identity';

COMMENT ON COLUMN "T_DEVICE_CERT"."CONTENT1" IS '密码模块返回的数字证书字符串';

COMMENT ON COLUMN "T_DEVICE_CERT"."CONTENT2" IS '证书的json信息';

COMMENT ON COLUMN "T_DEVICE_CERT"."DEVICEID" IS '关联设备外键';

COMMENT ON TABLE "T_DEVICE_CALLOVER_LOG" IS '点名表';

COMMENT ON COLUMN "T_DEVICE_CALLOVER_LOG"."ID" IS '系统ID';

COMMENT ON COLUMN "T_DEVICE_CALLOVER_LOG"."LOGINID" IS '用户ID';

COMMENT ON COLUMN "T_DEVICE_CALLOVER_LOG"."UDID" IS '设备udid';

COMMENT ON COLUMN "T_DEVICE_CALLOVER_LOG"."USERNAME" IS '用户名';

COMMENT ON COLUMN "T_DEVICE_CALLOVER_LOG"."MOBILE" IS '手机';

COMMENT ON COLUMN "T_DEVICE_CALLOVER_LOG"."CREATETIME" IS '上报时间';

COMMENT ON COLUMN "T_DEVICE_CALL"."ID" IS '通话id';

COMMENT ON COLUMN "T_DEVICE_CALL"."UDID" IS '设备id';

COMMENT ON COLUMN "T_DEVICE_CALL"."CALLTYPE" IS '通话类型，0呼出，1呼入';

COMMENT ON COLUMN "T_DEVICE_CALL"."ORIGINALNO" IS '主叫电话号码';

COMMENT ON COLUMN "T_DEVICE_CALL"."TERMINALNO" IS '被叫电话号码';

COMMENT ON COLUMN "T_DEVICE_CALL"."STARTTIME" IS '通话开始时间';

COMMENT ON COLUMN "T_DEVICE_CALL"."DURATION" IS '通话时长(秒)，0表示未接通';

COMMENT ON COLUMN "T_DEVICE_CALL"."LOCATION" IS '通话地点';

COMMENT ON COLUMN "T_DEVICE_CALL"."LOGINID" IS '用户帐号';

COMMENT ON COLUMN "T_DEVICE_CALL"."USERNAME" IS '用户名称';

COMMENT ON COLUMN "T_DEVICE_CALL"."DEVICENAME" IS '设备名称';

COMMENT ON COLUMN "T_DEVICE_CALL"."GROUPID" IS '组ID';

COMMENT ON COLUMN "T_DEVICE_CALL"."RELATIONSHIP" IS '所属关系';

COMMENT ON COLUMN "T_DEVICE_CALL"."PLATFORMTYPE" IS '平台类型';

COMMENT ON COLUMN "T_DEVICE_BROWSERHISTORY"."GROUPNAME" IS '组名称';

COMMENT ON TABLE "T_DEVICE_APP_ACTION" IS '设备应用行为表';

COMMENT ON COLUMN "T_DEVICE_APP_ACTION"."ID" IS 'id';

COMMENT ON COLUMN "T_DEVICE_APP_ACTION"."DEVICEID" IS '关联设备id';

COMMENT ON COLUMN "T_DEVICE_APP_ACTION"."APPNAME" IS '应用名称';

COMMENT ON COLUMN "T_DEVICE_APP_ACTION"."PKGNAME" IS '包名称';

COMMENT ON COLUMN "T_DEVICE_APP_ACTION"."VERSIONNAME" IS '大版本号';

COMMENT ON COLUMN "T_DEVICE_APP_ACTION"."VERSIONCODE" IS '小版本号';

COMMENT ON COLUMN "T_DEVICE_APP_ACTION"."STATUS" IS '状态（打开-1 关闭-0）';

COMMENT ON COLUMN "T_DEVICE_APP_ACTION"."OPERTIME" IS '操作时间';

COMMENT ON COLUMN "T_DEVICE_APP_ACTION"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_DEVICE_APP_ACTION"."UPDATETIME" IS '更新时间';

CREATE INDEX "T_DEVICE_APPUSAGE_INDEX"
ON "T_DEVICE_APPUSAGE"("USERID","DEVICEID","PKGNAME","VERSION","OCCUREDDATE");

CREATE INDEX "DEVICEID_INDEX"
ON "T_DEVICE_APP"("DEVICEID");

COMMENT ON TABLE "T_DEVICE_APP" IS '设备应用信息表';

COMMENT ON COLUMN "T_DEVICE_APP"."SCANTIME" IS 'scan time';

COMMENT ON COLUMN "T_DEVICE_APP"."CERTSHA1" IS '证书sha1';

COMMENT ON COLUMN "T_DEVICE_APP"."TYPE" IS '类型: (1 系统，2 其他）';

COMMENT ON COLUMN "T_DEVICE_APP"."USERID" IS '用户id';

COMMENT ON COLUMN "T_DEVICE_APP"."STATUS" IS '应用状态: 1 已安装  3 已删除 2 应用更新';

COMMENT ON COLUMN "T_DEVICE_APP"."ITUNESSTOREID" IS '苹果应用商店应用id';

COMMENT ON COLUMN "T_DEVICE_APP"."APPFLAG" IS '应用标识: 0--非企业管理;1--企业管理';

COMMENT ON COLUMN "T_DEVICE_APP"."FIRSTINSTALLTIME" IS '初次安装时间';

COMMENT ON COLUMN "T_DEVICE_APP"."LASTUPDATETIME" IS '最后更新时间';

COMMENT ON COLUMN "T_DEVICE_APP"."DEVELOPER" IS '开发者';

COMMENT ON COLUMN "T_DEVICE_APP"."SIMSENDFLOW" IS '数据网络的发送量';

COMMENT ON COLUMN "T_DEVICE_APP"."SIMRECVFLOW" IS '数据网络的接收量';

COMMENT ON COLUMN "T_DEVICE_APP"."WIFISENDFLOW" IS 'WiFi无线网络的发送量';

COMMENT ON COLUMN "T_DEVICE_APP"."WIFIRECVFLOW" IS 'WiFi无线网络的接收量';

COMMENT ON COLUMN "T_DEVICE_APP"."POWERCONSUMPTION" IS '耗电量（毫安时）';

COMMENT ON COLUMN "T_DEVICE_APP"."RUNNINGTIME" IS '运行时间（毫秒）';

COMMENT ON COLUMN "T_DEVICE_APP"."EXCEPTIONCOUNT" IS '异常次数';

CREATE INDEX "INDEX_TYPE_AND_UDID"
ON "T_DEVICE_APN_TOKEN"("TYPE","UDID");

COMMENT ON TABLE "T_DEVICE_APN_TOKEN" IS '设备apn的token表';

COMMENT ON COLUMN "T_DEVICE_APN_TOKEN"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_DEVICE_APN_TOKEN"."UDID" IS '设备udid';

COMMENT ON COLUMN "T_DEVICE_APN_TOKEN"."TOKEN" IS 'apns的token';

COMMENT ON COLUMN "T_DEVICE_APN_TOKEN"."TYPE" IS 'apn的类型: 0 com.nq.mdm 1 com.nq.mcm';

COMMENT ON COLUMN "T_DEVICE_APN_TOKEN"."PKGNAME" IS '该token对应的app包名';

COMMENT ON COLUMN "T_DEVICE_APN_TOKEN"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_DEVICE_APN_TOKEN"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_DEVICE_APN"."APNID" IS 'APN ID';

COMMENT ON COLUMN "T_DEVICE_APN"."DESCRIPTION" IS 'APN描述';

COMMENT ON COLUMN "T_DEVICE_APN"."APNNAME" IS 'APN名称';

COMMENT ON COLUMN "T_DEVICE_APN"."APNTYPE" IS 'APN类';

COMMENT ON COLUMN "T_DEVICE_APN"."NETWORKCODE" IS '运营商网络码';

COMMENT ON COLUMN "T_DEVICE_APN"."MCC" IS 'MCC';

COMMENT ON COLUMN "T_DEVICE_APN"."MNC" IS 'MNC';

COMMENT ON COLUMN "T_DEVICE_APN"."PROXY" IS '代理';

COMMENT ON COLUMN "T_DEVICE_APN"."PORT" IS '端口';

COMMENT ON COLUMN "T_DEVICE_APN"."MMSPROXY" IS '彩信代理';

COMMENT ON COLUMN "T_DEVICE_APN"."MMSPORT" IS '彩信端口';

COMMENT ON COLUMN "T_DEVICE_APN"."USERNAME" IS '用户名';

COMMENT ON COLUMN "T_DEVICE_APN"."SERVER" IS '服务器';

COMMENT ON COLUMN "T_DEVICE_APN"."PASSWORD" IS '密码';

COMMENT ON COLUMN "T_DEVICE_APN"."MMSC" IS 'MMSC';

COMMENT ON COLUMN "T_DEVICE_APN"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_DEVICE_APN"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_DEVICE_APN"."DEVICEID" IS '关联设备外键';

COMMENT ON COLUMN "T_DEVICE_ACCESSWEB"."GROUPNAME" IS '组名称';

COMMENT ON COLUMN "T_DEVICE_ACCESSWEB"."APPNAME" IS '应用名称';

CREATE INDEX "IDX_T_DEVICE_DEVICENAME"
ON "T_DEVICE"("DEVICENAME");

CREATE INDEX "IDX_T_DEVICE_SHORTUDID"
ON "T_DEVICE"("SHORTUDID");

CREATE INDEX "IDX_T_DEVICE_UDID"
ON "T_DEVICE"("UDID");

CREATE INDEX "IDX_T_DEVICE_IMEI"
ON "T_DEVICE"("IMEI");

COMMENT ON TABLE "T_DEVICE" IS '设备信息表';

COMMENT ON COLUMN "T_DEVICE"."USERID" IS '所属用户用户id';

COMMENT ON COLUMN "T_DEVICE"."SHORTUDID" IS 'unique device short identifier';

COMMENT ON COLUMN "T_DEVICE"."UDID" IS 'unique device identifier';

COMMENT ON COLUMN "T_DEVICE"."IDFA" IS 'unique device identifier(IOS7)';

COMMENT ON COLUMN "T_DEVICE"."IMEI" IS 'imei:international mobile equipment identity';

COMMENT ON COLUMN "T_DEVICE"."IMSI" IS 'imsi:international mobile subscriber identity';

COMMENT ON COLUMN "T_DEVICE"."BUYTIME" IS '购买时间';

COMMENT ON COLUMN "T_DEVICE"."WARRANTY" IS '保修期';

COMMENT ON COLUMN "T_DEVICE"."DEVICETYPE" IS '设备类型 10-android phone 11-android pad;20-iphone 21-ipad 22-ipadmini 23- ipodtouch';

COMMENT ON COLUMN "T_DEVICE"."TYPE" IS '平台1--android;2--ios';

COMMENT ON COLUMN "T_DEVICE"."RELATIONSHIP" IS '设备所属关系  1--公司设备;2--员工设备;3--其他';

COMMENT ON COLUMN "T_DEVICE"."DEVICENAME" IS '设备名称';

COMMENT ON COLUMN "T_DEVICE"."DEVICENUMBER" IS '设备编号';

COMMENT ON COLUMN "T_DEVICE"."INITSIMINFO" IS '激活时SIM卡信息，Android设备为IMSI，iOS设备为ICCID';

COMMENT ON COLUMN "T_DEVICE"."INITSDSERIALNUM" IS '激活时的SD卡序列号';

COMMENT ON COLUMN "T_DEVICE"."SERIALNUM" IS '设备序列号';

COMMENT ON COLUMN "T_DEVICE"."MANUFACTURER" IS '设备厂商';

COMMENT ON COLUMN "T_DEVICE"."MODEL" IS '设备型号,例如：MC319LL';

COMMENT ON COLUMN "T_DEVICE"."OS" IS '操作系统平台';

COMMENT ON COLUMN "T_DEVICE"."VERSIONUM" IS ' 版本号';

COMMENT ON COLUMN "T_DEVICE"."PHONECODE" IS '手机号码';

COMMENT ON COLUMN "T_DEVICE"."ROMCAPACITY" IS 'rom 总容量';

COMMENT ON COLUMN "T_DEVICE"."ROMAVAILABLECAPACITY" IS 'rom 可用空间';

COMMENT ON COLUMN "T_DEVICE"."SDCAPACITY" IS 'sd卡容量';

COMMENT ON COLUMN "T_DEVICE"."SDAVAILABLECAPACITY" IS 'sd卡可用空间';

COMMENT ON COLUMN "T_DEVICE"."SDSERIALNUM" IS 'sd卡序列号';

COMMENT ON COLUMN "T_DEVICE"."CAMERA" IS '摄像头';

COMMENT ON COLUMN "T_DEVICE"."WIFIMAC" IS 'wifi mac地址';

COMMENT ON COLUMN "T_DEVICE"."BLUETOOTHMAC" IS '蓝牙 mac地址';

COMMENT ON COLUMN "T_DEVICE"."POWERSTATUS" IS '电源状态';

COMMENT ON COLUMN "T_DEVICE"."BOOTTIME" IS '开机时长';

COMMENT ON COLUMN "T_DEVICE"."CAPACITY" IS '存储容量(ios)';

COMMENT ON COLUMN "T_DEVICE"."CAPACITYSTATUS" IS '存储容量状态(ios)';

COMMENT ON COLUMN "T_DEVICE"."AVAILABLECAPACITY" IS '可用空间(ios)';

COMMENT ON COLUMN "T_DEVICE"."IP" IS 'ip地址';

COMMENT ON COLUMN "T_DEVICE"."ENCRYPTIONLEVEL" IS '加密级别';

COMMENT ON COLUMN "T_DEVICE"."ROOTFLAG" IS '是否破解root, 0--未破解 ;1--破解 ';

COMMENT ON COLUMN "T_DEVICE"."LASTONLINETIME" IS '最后在线时间';

COMMENT ON COLUMN "T_DEVICE"."ONLINEFLAG" IS '设备是否在线 0--在线;1--不在线';

COMMENT ON COLUMN "T_DEVICE"."JAILBREAKFLAG" IS '设备是否越狱 0--否;1--是';

COMMENT ON COLUMN "T_DEVICE"."STATUS" IS '设备状态,0--未注册,1--注册未激活,2--激活可用, 3--保留 4--擦除';

COMMENT ON COLUMN "T_DEVICE"."REGISTTIME" IS '注册时间';

COMMENT ON COLUMN "T_DEVICE"."ACTIVATETIME" IS '激活时间';

COMMENT ON COLUMN "T_DEVICE"."TOKEN" IS 'ios mdm发送唤醒使用';

COMMENT ON COLUMN "T_DEVICE"."PUSHMAGIC" IS 'ios mdm发送唤醒使用';

COMMENT ON COLUMN "T_DEVICE"."UNLOCKTOKEN" IS 'ios mdm解除锁屏使用';

COMMENT ON COLUMN "T_DEVICE"."CHALLENGE" IS 'ios mdm激活使用';

COMMENT ON COLUMN "T_DEVICE"."SENDREGISTNOTICEFLAG" IS '是否发送注册通知信息,0--否;1--是';

COMMENT ON COLUMN "T_DEVICE"."ALLOWACTROOTORJAILBREAKFLAG" IS '是否允许root/越狱设备激活,0--否;1--是';

COMMENT ON COLUMN "T_DEVICE"."REMARK" IS '备注';

COMMENT ON COLUMN "T_DEVICE"."ROAMINGFLAG" IS '设备漫游开关 0--否;1--是';

COMMENT ON COLUMN "T_DEVICE"."UPDATETIME" IS '设备信息更新时间';

COMMENT ON COLUMN "T_DEVICE"."APNSTOKEN" IS 'apns的设备token';

COMMENT ON COLUMN "T_DEVICE"."LOSTFLAG" IS '是否丢失：0 --未丢失，1 --丢失';

COMMENT ON COLUMN "T_DEVICE"."DATAENCRYPTIONFLAG" IS '是否开启数据加密.0--否;1--是';

COMMENT ON COLUMN "T_DEVICE"."SPECIALTYPEFLAG" IS '特殊设备类型标识.0--普通设备;100--Samsung safe设备;101--Samsung KNOX设备;301--华为设备';

COMMENT ON COLUMN "T_DEVICE"."KNOXSTATUS" IS 'knox状态,0--不支持;201--支持未注入;202--SAFE license已注入;203--KNOX license已注入;101--已创建;501--锁定;301--华为插件已激活;302--移除华为插件';

COMMENT ON COLUMN "T_DEVICE"."PRODUCTNAME" IS '设备型号码 ,例如：iPhone3,1';

COMMENT ON COLUMN "T_DEVICE"."OFFLINESTATUS" IS '设备是否失联：0未失联，1失联';

COMMENT ON COLUMN "T_DEVICE"."OFFLINETHRESHOLD" IS '设备失联违规天数';

COMMENT ON COLUMN "T_DEVICE"."EMMLOGINAGAIN" IS '自服务是否修改密码 0-未修改 1-已修改';

COMMENT ON COLUMN "T_DEVICE"."HOSTID" IS 'hostId proxy激活时的hostId';

COMMENT ON COLUMN "T_DEVICE"."USAGESTATS" IS '应用使用量统计状态 0 未启用，1 启用';

COMMENT ON COLUMN "T_DEVICE"."FLOWUPDATE" IS '流量是否有更新 0 未更新，1 有更新';

COMMENT ON COLUMN "T_DEVICE"."FLOWQUOTA" IS '流量配额';

COMMENT ON COLUMN "T_DEVICE"."CLIENTVERSION" IS 'EMM 客户端版本号';

COMMENT ON COLUMN "T_DEVICE"."BITLOCKER" IS 'BitLocker加密状态 0:未加密 1:整个硬盘加密 2:系统分区加密';

COMMENT ON COLUMN "T_DEVICE"."MEID" IS '副卡对应的设备识别码,(如无副卡,可为空)';

COMMENT ON COLUMN "T_DEVICE"."RESOLUTION" IS '屏幕分辨率,(字符串,长*高,如640*480)';

COMMENT ON COLUMN "T_DEVICE"."OSCOREVERSION" IS '系统内核版本号';

COMMENT ON COLUMN "T_DEVICE"."OSSOFTWAREVERSION" IS '系统软件版本号';

COMMENT ON COLUMN "T_DEVICE"."SAFETYOSVERSION" IS '安全加固双操作系统版本,(如无,可为空)';

COMMENT ON COLUMN "T_DEVICE"."PATCHLEVEL" IS '系统安全补丁程序级别(如无,可为空)';

COMMENT ON COLUMN "T_DEVICE"."ICCID2" IS 'ICCID(SIM卡2的ICCID)';

COMMENT ON COLUMN "T_DEVICE"."IMSI2" IS 'IMSI(SIM卡2的IMSI,如无卡2，可为空)';

COMMENT ON COLUMN "T_DEVICE"."NETWORKTYPE" IS '支持的移动网络制式';

COMMENT ON COLUMN "T_DEVICE"."WLANADAPTERCHIP" IS '无线网卡芯片型号';

COMMENT ON COLUMN "T_DEVICE"."BTADAPTERCHIP" IS '蓝牙芯片型号';

COMMENT ON COLUMN "T_DEVICE"."NFCCHIP" IS 'NFC芯片型号';

COMMENT ON COLUMN "T_DEVICE"."LOCATORCHIP" IS '定位芯片型号';

COMMENT ON COLUMN "T_DEVICE"."CLIENTBUILDNUM" IS 'EMM客户端Build号';

COMMENT ON COLUMN "T_DEVICE"."CPURATIO" IS 'CPU占用率';

COMMENT ON COLUMN "T_DEVICE"."MEMORYRATIO" IS '内存占用率';

COMMENT ON COLUMN "T_DEVICE"."STORAGERATIO" IS '存储占用率';

COMMENT ON COLUMN "T_DEVICE"."BLUETOOTHSTATE" IS '蓝牙状态，1-开启,0 -关闭';

COMMENT ON COLUMN "T_DEVICE"."WIFISTATE" IS 'wifi状态，1-开启 0-关闭';

COMMENT ON COLUMN "T_DEVICE"."CAMERASTATE" IS '相机状态，1-开启 0-关闭';

COMMENT ON COLUMN "T_DEVICE"."MICROPHONESTATE" IS '麦克风状态，1-开启 0-关闭';

COMMENT ON COLUMN "T_DEVICE"."MOBILEDATASTATE" IS '移动数据状态，1-开启 0-关闭';

COMMENT ON COLUMN "T_DEVICE"."APN" IS 'apn集合，status:0 未连接 ，1连接';

COMMENT ON COLUMN "T_DEVICE"."BUILDNUMBER" IS '内核版本';

COMMENT ON COLUMN "T_DEVICE"."GPSSTATE" IS 'GPS状态：0-关闭 1-开启';

COMMENT ON COLUMN "T_DEVICE"."SYNCFLAG" IS '是否上报成功  1-上报绑定成功 10-上报绑定失败 2-上报解绑成功 20-上报解绑失败';

COMMENT ON COLUMN "T_DEVICE"."DUALSTATUS" IS '双域状态（0-工作域 1-生活域）';

COMMENT ON COLUMN "T_DEVICE"."SIMOPER" IS 'sim卡操作 1-更新sim卡 0-撤销更新sim卡';

COMMENT ON COLUMN "T_DEVICE"."TPMREPORT" IS '可信度  2-不安全 1-安全';

COMMENT ON COLUMN "T_DEVICE"."SYSTEMINTEGRITY" IS '系统完整性  2-不完整 1-完整';

COMMENT ON COLUMN "T_DEVICE"."IDP" IS '第三方idp名称，idp_device_id对应';

COMMENT ON COLUMN "T_DEVICE"."IDPDEVICEID" IS 'device_id对应的idp';

COMMENT ON COLUMN "T_DEVICE"."APPTYPE" IS '应用类型';

COMMENT ON COLUMN "T_DEVICE"."SUBGROUPID" IS '支行ID';

COMMENT ON COLUMN "T_DEVICE"."ORGCODE" IS '支行代码';

COMMENT ON COLUMN "T_DEVICE"."LOGINID" IS 'loginid';

COMMENT ON COLUMN "T_DEVICE"."MAINTAINFLAG" IS '是否维修完成, 0--维修完成 ;1--维修中';

COMMENT ON COLUMN "T_DEVICE"."SCREENPWD" IS '锁屏密码(安卓)';

COMMENT ON COLUMN "T_DEVICE"."WANT_CHANGED_PWD" IS '欲修改的密码';

COMMENT ON COLUMN "T_DEVICE"."LABEL" IS '设备标签';

COMMENT ON COLUMN "T_DEVICE"."ERASEFLAG" IS '0--检测擦除中 ;1--检测有数据未擦除';

COMMENT ON TABLE "T_CONTACT_VERSION" IS '通讯录版本';

COMMENT ON COLUMN "T_CONTACT_VERSION"."VERSION" IS '版本名称 eg：20110608001';

COMMENT ON COLUMN "T_CONTACT_VERSION"."VERSION_NO" IS '版本号';

COMMENT ON COLUMN "T_CONTACT_VERSION"."ACTIVED" IS '是否为当前版本:0否1是默认0';

COMMENT ON COLUMN "T_CONTACT_VERSION"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_CONTACT_VERSION"."UPDATETIME" IS '修改时间';

COMMENT ON TABLE "T_CONTACT_LOG" IS '通讯录日志表';

COMMENT ON COLUMN "T_CONTACT_LOG"."OPERTYPE" IS '操作类型: 0 user add 1 user del 2 user modified 3 data add 4 data del 5 data modified 默认0';

COMMENT ON COLUMN "T_CONTACT_LOG"."USERID" IS '用户id';

COMMENT ON COLUMN "T_CONTACT_LOG"."DISPLAY" IS '全名';

COMMENT ON COLUMN "T_CONTACT_LOG"."FAMILY" IS '姓';

COMMENT ON COLUMN "T_CONTACT_LOG"."GIVEN" IS '名';

COMMENT ON COLUMN "T_CONTACT_LOG"."MIDDLE" IS '中间姓名';

COMMENT ON COLUMN "T_CONTACT_LOG"."PREDISPLAY" IS '之前全名';

COMMENT ON COLUMN "T_CONTACT_LOG"."PREFAMILY" IS '之前姓';

COMMENT ON COLUMN "T_CONTACT_LOG"."PREGIVEN" IS '之前名';

COMMENT ON COLUMN "T_CONTACT_LOG"."PREMIDDLE" IS '之前中间姓名';

COMMENT ON COLUMN "T_CONTACT_LOG"."CATEGORY" IS '联系方式分类: 0 tel 1 email 2 addr 3 org 默认 0';

COMMENT ON COLUMN "T_CONTACT_LOG"."DATA" IS '数据';

COMMENT ON COLUMN "T_CONTACT_LOG"."TYPE" IS '数据类型';

COMMENT ON COLUMN "T_CONTACT_LOG"."TITLE" IS '标题';

COMMENT ON COLUMN "T_CONTACT_LOG"."PREDATA" IS '之前数据';

COMMENT ON COLUMN "T_CONTACT_LOG"."PRETYPE" IS '之前数据类型';

COMMENT ON COLUMN "T_CONTACT_LOG"."PRETITLE" IS '之前标题';

COMMENT ON COLUMN "T_CONTACT_LOG"."VERSION" IS '版本名称 eg：20110608001 临时版本 :00000000001';

COMMENT ON COLUMN "T_CONTACT_LOG"."CREATETIME" IS '创建时间';

CREATE INDEX "CONTACTID"
ON "T_CONTACT_DATA"("CONTACTID");

COMMENT ON TABLE "T_CONTACT_DATA" IS '联系人联系方式详情表';

COMMENT ON COLUMN "T_CONTACT_DATA"."CONTACTID" IS '联系人id';

COMMENT ON COLUMN "T_CONTACT_DATA"."CATEGORY" IS '联系方式分类: 0 tel 1 email 2 addr 3 org 默认 0';

COMMENT ON COLUMN "T_CONTACT_DATA"."DATA" IS '数据';

COMMENT ON COLUMN "T_CONTACT_DATA"."TYPE" IS '数据类型';

COMMENT ON COLUMN "T_CONTACT_DATA"."TITLE" IS '标题';

COMMENT ON COLUMN "T_CONTACT_DATA"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_CONTACT_DATA"."UPDATETIME" IS '修改时间';

COMMENT ON TABLE "T_CONTACT" IS '通讯录表';

COMMENT ON COLUMN "T_CONTACT"."DISPLAY" IS '联系人名称(全名)';

COMMENT ON COLUMN "T_CONTACT"."USERID" IS '用户id';

COMMENT ON COLUMN "T_CONTACT"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_CONTACT"."UPDATETIME" IS '修改时间';

COMMENT ON TABLE "T_CONNECTOR" IS 'connector配置表';

COMMENT ON COLUMN "T_CONNECTOR"."NAME" IS 'connector name';

COMMENT ON COLUMN "T_CONNECTOR"."TYPE" IS 'wework or dingding';

COMMENT ON COLUMN "T_CONNECTOR"."CONFIG" IS '配置信息，json格式';

COMMENT ON COLUMN "T_CONNECTOR"."OVERRIDEORIGNORE" IS '导入冲突处理方式 忽略或者覆盖';

COMMENT ON COLUMN "T_CONNECTOR"."AUTOSYNCINTERVAL" IS '自动同步周期（小时） 0-不自动同步';

COMMENT ON COLUMN "T_CONNECTOR"."MOUNTGROUPID" IS '导入到的目标组id';

COMMENT ON COLUMN "T_CONNECTOR"."LASTSYNCSTARTTIME" IS '上次同步开始时间';

COMMENT ON COLUMN "T_CONNECTOR"."LASTSYNCENDTIME" IS '上次同步结束时间';

COMMENT ON COLUMN "T_CONNECTOR"."LASTSYNCSTATUS" IS '上次同步状态';

COMMENT ON COLUMN "T_CONNECTOR"."LASTSYNCSTATS" IS '上次同步统计信息，例如增加多少用户，更新多少，删除多少，增加多少组，更新多少，删除多少';

COMMENT ON COLUMN "T_CONNECTOR"."SYNCBATCHNO" IS '上次同步批次号';

COMMENT ON TABLE "T_CONFIG" IS 'config table';

COMMENT ON COLUMN "T_CONFIG"."K" IS 'config key';

COMMENT ON COLUMN "T_CONFIG"."V" IS 'config value';

COMMENT ON COLUMN "T_CONFIG"."DESCRIPTION" IS 'short description for this config item.';

COMMENT ON TABLE "T_COMPLIANCE_SCHEDULE" IS '违规计划任务表';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."TASKLEVEL" IS '任务级别';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."TASKCODE" IS '任务编号';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."PLATFORMTYPE" IS '平台 0:default 1:android 2:ios 3: windows8 4: windowsphone8';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."UDID" IS '设备udid';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."VIOLATIONID" IS '违规id';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."CONDID" IS '违规 条件字典表id';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."PROCSTRATEGYID" IS '违规 处理策略id';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."PROCESSID" IS '违规 处理字典表id';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."GRACEPERIOD" IS '违规处理宽限时间(分钟)';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."PACKAGENAMES" IS '违规报名';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."DEVICEPROCID" IS 'violationdeviceprocid';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."PROCUUID" IS 'violationdeviceproc.uuid';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."POLICYID" IS '配置策略id';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."ACTIONCODE" IS '动作编码号';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."MEASURECODE" IS '措施编码号';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."JOBNAME" IS '工作名称';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."JOBGROUP" IS '工作组';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."TRIGGERNAME" IS '触发器名称';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."TRIGGERGROUP" IS '触发器组';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."CRONEXPRESSION" IS '时间表达式';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."TASKSTATUS" IS '任务状态:1-未执行，2-已执行, 3-已合规';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."RESERVED1" IS '保留字段1';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."RESERVED2" IS '保留字段2';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."REMARK" IS '描述';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."CREATEDATE" IS '创建时间';

COMMENT ON COLUMN "T_COMPLIANCE_SCHEDULE"."MODIFYDATE" IS '修改时间';

COMMENT ON TABLE "T_COMMAND_LOG" IS '指令发送量日志';

COMMENT ON COLUMN "T_COMMAND_LOG"."LOGTIME" IS '日志时间';

COMMENT ON COLUMN "T_COMMAND_LOG"."NUM" IS '指令总和';

COMMENT ON TABLE "T_CLIENT_POLICY" IS 'client_policy, 用于存储client被下发的policy信息';

COMMENT ON COLUMN "T_CLIENT_POLICY"."ID" IS '主键';

COMMENT ON COLUMN "T_CLIENT_POLICY"."CLIENTID" IS '对应的client id';

COMMENT ON COLUMN "T_CLIENT_POLICY"."POLICYID" IS '对应的policy id';

COMMENT ON COLUMN "T_CLIENT_POLICY"."STATUS" IS '状态 0 - 等待下发, 1 - 下发中, 2 - 已下发, 3 - 已启用, 4 - 启用失败';

COMMENT ON COLUMN "T_CLIENT_POLICY"."DISTRIBUTEDATETIME" IS '下发时间';

COMMENT ON COLUMN "T_CLIENT_POLICY"."TRYTIMES" IS '已经尝试下发的次数';

COMMENT ON COLUMN "T_CLIENT_POLICY"."CHANGETIME" IS 'client下发的policy变更的时间戳';

COMMENT ON COLUMN "T_CLIENT_POLICY"."CREATEDDATETIME" IS '创建时间';

COMMENT ON COLUMN "T_CLIENT_POLICY"."UPDATEDDATETIME" IS '修改时间';

CREATE INDEX "CLIENT_USER_ID"
ON "T_CLIENT"("USERID");

COMMENT ON TABLE "T_CLIENT" IS 'client表, 用于存储client在BeMail Console中的注册信息';

COMMENT ON COLUMN "T_CLIENT"."ID" IS '主键';

COMMENT ON COLUMN "T_CLIENT"."HOSTID" IS 'client注册时发送过来的Host Id';

COMMENT ON COLUMN "T_CLIENT"."APPID" IS 'client对应的APP ID';

COMMENT ON COLUMN "T_CLIENT"."TENANTID" IS 'client注册时发送过来的Tenant Id';

COMMENT ON COLUMN "T_CLIENT"."APPVERSION" IS 'client对应的APP版本';

COMMENT ON COLUMN "T_CLIENT"."PLATFORM" IS 'client对应的平台，例如Android或者iOS';

COMMENT ON COLUMN "T_CLIENT"."USERID" IS 'client所属user的id';

COMMENT ON COLUMN "T_CLIENT"."STATUS" IS '状态 1 - INSTALLED, 2 - ACTIVE, 3 - SUSPENDED, 0 - UNINSTALLED';

COMMENT ON COLUMN "T_CLIENT"."TOKEN" IS 'client注册后生成的token';

COMMENT ON COLUMN "T_CLIENT"."PNSTOKEN" IS 'client订阅时发送过来的pnsToken';

COMMENT ON COLUMN "T_CLIENT"."PNSTOKENTYPE" IS 'client订阅时发送过来的pnsToken类型';

COMMENT ON COLUMN "T_CLIENT"."CREATEDDATETIME" IS '创建时间';

COMMENT ON COLUMN "T_CLIENT"."UPDATEDDATETIME" IS '修改时间';

COMMENT ON COLUMN "T_CLIENT"."UDID" IS 'unique device identifier';

CREATE INDEX "IDX_APP_TRAFFIC_PKGNAME"
ON "T_APP_TRAFFIC"("APPPACKAGE");

CREATE INDEX "IDX_APP_TRAFFIC_UDID"
ON "T_APP_TRAFFIC"("UDID");

COMMENT ON COLUMN "T_APP_TRAFFIC"."ID" IS 'id';

COMMENT ON COLUMN "T_APP_TRAFFIC"."LOGINID" IS '用户帐号';

COMMENT ON COLUMN "T_APP_TRAFFIC"."UDID" IS '设备udid';

COMMENT ON COLUMN "T_APP_TRAFFIC"."ENDTIME" IS '统计截止时间';

COMMENT ON COLUMN "T_APP_TRAFFIC"."SIM1NUM" IS 'sim1日流量';

COMMENT ON COLUMN "T_APP_TRAFFIC"."SIM2NUM" IS 'sim2日流量';

COMMENT ON COLUMN "T_APP_TRAFFIC"."WIFINUM" IS 'wifi日流量';

COMMENT ON COLUMN "T_APP_TRAFFIC"."APPPACKAGE" IS 'app包名';

COMMENT ON COLUMN "T_APP_TRAFFIC"."APPNAME" IS 'app名称';

COMMENT ON COLUMN "T_APP_TRAFFIC"."USERNAME" IS '用户名称';

COMMENT ON COLUMN "T_APP_TRAFFIC"."DEVICENAME" IS '设备名称';

COMMENT ON COLUMN "T_APP_TRAFFIC"."GROUPID" IS '组ID';

COMMENT ON COLUMN "T_APP_TRAFFIC"."RELATIONSHIP" IS '所属关系';

COMMENT ON COLUMN "T_APP_TRAFFIC"."PLATFORMTYPE" IS '平台类型';

CREATE INDEX "APPID"
ON "T_APP_TIME_GROUP"("APPID");

COMMENT ON TABLE "T_APP_TIME_GROUP" IS '应用定时下发的中间表';

COMMENT ON COLUMN "T_APP_TIME_GROUP"."APPID" IS '应用id';

COMMENT ON COLUMN "T_APP_TIME_GROUP"."GROUPID" IS '用户组id';

COMMENT ON COLUMN "T_APP_TIME_GROUP"."STARTTIME" IS '开始时间';

COMMENT ON COLUMN "T_APP_TIME_GROUP"."CUSTOMFLAG" IS '自定义标识: 0-继承 ;1-自定义';

CREATE INDEX "USERID_INDEX"
ON "T_APP_STRATEGY_USER"("USERID");

CREATE INDEX "STRATEGYID_INDEX"
ON "T_APP_STRATEGY_USER"("STRATEGYID");

COMMENT ON TABLE "T_APP_STRATEGY_USER" IS '应用策略用户表';

COMMENT ON COLUMN "T_APP_STRATEGY_USER"."CUSTOMFLAG" IS '自定义标识: 0-继承 ;1-自定义';

COMMENT ON COLUMN "T_APP_STRATEGY_USER"."EXCEPTIONFLAG" IS '例外标识: 0-添加 ;1-排除';

COMMENT ON COLUMN "T_APP_STRATEGY_USER"."STRATEGYPUSHID" IS '应用策略推送ID';

CREATE INDEX "STRATEGYID"
ON "T_APP_STRATEGY_STORE"("STRATEGYID");

COMMENT ON TABLE "T_APP_STRATEGY_STORE" IS '应用商店应用策略关联表';

COMMENT ON COLUMN "T_APP_STRATEGY_STORE"."STRATEGYID" IS '应用策略id';

COMMENT ON COLUMN "T_APP_STRATEGY_STORE"."PACKAGENAME" IS '应用包名';

COMMENT ON COLUMN "T_APP_STRATEGY_STORE"."APPNAME" IS '名称';

COMMENT ON COLUMN "T_APP_STRATEGY_STORE"."APPVERSION" IS '版本';

COMMENT ON COLUMN "T_APP_STRATEGY_STORE"."DESCRIPTION" IS '描述';

COMMENT ON TABLE "T_APP_STRATEGY_PUSH" IS '应用策略推送';

COMMENT ON COLUMN "T_APP_STRATEGY_PUSH"."ID" IS '推送id';

COMMENT ON COLUMN "T_APP_STRATEGY_PUSH"."APPSTRATEGYID" IS '应用策略id';

COMMENT ON COLUMN "T_APP_STRATEGY_PUSH"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_APP_STRATEGY_PUSH"."PUSHDEVICETYPE" IS '推送设备所属关系：0-全部；1-公司；2-员工；3-其他';

COMMENT ON COLUMN "T_APP_STRATEGY_PUSH"."IRREPUSHFLAG" IS '违规推送标识：0-不推送；1-推送';

COMMENT ON COLUMN "T_APP_STRATEGY_PUSH"."LOGINID" IS '用户id';

CREATE INDEX "LABELID"
ON "T_APP_STRATEGY_LABEL"("LABELID");

COMMENT ON TABLE "T_APP_STRATEGY_LABEL" IS '应用策略标签表';

COMMENT ON COLUMN "T_APP_STRATEGY_LABEL"."STRATEGYID" IS '应用策略id';

COMMENT ON COLUMN "T_APP_STRATEGY_LABEL"."LABELID" IS '标签id';

COMMENT ON COLUMN "T_APP_STRATEGY_IRRE_LOG"."USERID" IS '用户id';

COMMENT ON COLUMN "T_APP_STRATEGY_IRRE_LOG"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_APP_STRATEGY_IRRE_LOG"."STRATEGYID" IS '应用策略id';

COMMENT ON COLUMN "T_APP_STRATEGY_IRRE_LOG"."PACKAGENAME" IS '应用包名';

COMMENT ON COLUMN "T_APP_STRATEGY_IRRE_LOG"."APPNAME" IS '应用名称';

COMMENT ON COLUMN "T_APP_STRATEGY_IRRE_LOG"."APPVERSION" IS '应用版本';

CREATE INDEX "GROUPID_INDEX"
ON "T_APP_STRATEGY_GROUP"("GROUPID");

COMMENT ON TABLE "T_APP_STRATEGY_GROUP" IS '应用策略用户组表';

COMMENT ON COLUMN "T_APP_STRATEGY_GROUP"."STRATEGYID" IS '应用策略id';

COMMENT ON COLUMN "T_APP_STRATEGY_GROUP"."GROUPID" IS '用户组id';

COMMENT ON COLUMN "T_APP_STRATEGY_GROUP"."CUSTOMFLAG" IS '自定义标识: 0-继承 ;1-自定义';

COMMENT ON COLUMN "T_APP_STRATEGY_GROUP"."STRATEGYPUSHID" IS '应用策略推送ID';

COMMENT ON TABLE "T_APP_STRATEGY_DEVICE" IS '设备与应用策略关联表';

COMMENT ON COLUMN "T_APP_STRATEGY_DEVICE"."STRATEGYID" IS '应用策略id';

COMMENT ON COLUMN "T_APP_STRATEGY_DEVICE"."CREATETIME" IS '下发时间';

COMMENT ON COLUMN "T_APP_STRATEGY_DEVICE"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_APP_STRATEGY_DEVICE"."STATUS" IS '执行状态,0--未生效;1--已生效';

COMMENT ON COLUMN "T_APP_STRATEGY_DEVICE"."STRATEGYPUSHID" IS '应用策略推送ID';

COMMENT ON TABLE "T_APP_STRATEGY" IS '应用策略表';

COMMENT ON COLUMN "T_APP_STRATEGY"."NAME" IS '名称';

COMMENT ON COLUMN "T_APP_STRATEGY"."DESCRIPTION" IS '描述';

COMMENT ON COLUMN "T_APP_STRATEGY"."TYPE" IS '1--白名单;2--黑名单';

COMMENT ON COLUMN "T_APP_STRATEGY"."PLATFORMTYPE" IS '平台1--android;2--ios;3--windows8;4--windows phone8';

COMMENT ON COLUMN "T_APP_STRATEGY"."PUSHDEVICETYPE" IS '推送设备所属关系：0-全部；1-公司；2-员工；3-其他';

COMMENT ON COLUMN "T_APP_STRATEGY"."IRREPUSHFLAG" IS '违规推送标识：0-不推送；1-推送';

COMMENT ON COLUMN "T_APP_STRATEGY"."STATUS" IS '应用策略的状态标志：0-禁用；1-启用；默认禁用';

COMMENT ON COLUMN "T_APP_STRATEGY"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_APP_STRATEGY"."LOGINID" IS '创建人';

COMMENT ON COLUMN "T_APP_STRATEGY"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_APP_STRATEGY"."UPDATEBY" IS '修改人';

COMMENT ON COLUMN "T_APP_STRATEGY"."DISTTYPE" IS '默认为0 0-用户／用户组 1-标签';

COMMENT ON COLUMN "T_APP_STRATEGY"."COPYNUM" IS '黑白名单复制编号';

COMMENT ON TABLE "T_APP_STORE_USER_GROUP" IS '应用分发用户组关联表';

COMMENT ON COLUMN "T_APP_STORE_USER_GROUP"."ID" IS 'uuid';

COMMENT ON COLUMN "T_APP_STORE_USER_GROUP"."GROUPID" IS '用户组';

COMMENT ON COLUMN "T_APP_STORE_USER_GROUP"."APPSTOREID" IS '应用id';

COMMENT ON COLUMN "T_APP_STORE_USER_GROUP"."CUSTOMFLAG" IS '自定义标识: 0-继承 ;1-自定义';

COMMENT ON COLUMN "T_APP_STORE_USER_GROUP"."ESSENTIALAPP" IS '是否系统客户端应用：必装应用： 1 必装 默认 0';

COMMENT ON COLUMN "T_APP_STORE_USER_GROUP"."APPPUSHID" IS '应用推送ID';

COMMENT ON COLUMN "T_APP_STORE_USER_GROUP"."APPCONF" IS '应用配置';

COMMENT ON TABLE "T_APP_STORE_USER" IS '应用分发用户关联表';

COMMENT ON COLUMN "T_APP_STORE_USER"."ID" IS 'uuid';

COMMENT ON COLUMN "T_APP_STORE_USER"."USERID" IS '用户id';

COMMENT ON COLUMN "T_APP_STORE_USER"."APPSTOREID" IS '应用id';

COMMENT ON COLUMN "T_APP_STORE_USER"."CUSTOMFLAG" IS '自定义标识: 0-继承 ;1-自定义';

COMMENT ON COLUMN "T_APP_STORE_USER"."EXCEPTIONFLAG" IS '例外标识: 0-添加 ;1-排除';

COMMENT ON COLUMN "T_APP_STORE_USER"."ESSENTIALAPP" IS '是否系统客户端应用：必装应用： 1 必装 默认 0';

COMMENT ON COLUMN "T_APP_STORE_USER"."APPPUSHID" IS '应用推送ID';

COMMENT ON COLUMN "T_APP_STORE_USER"."APPCONF" IS '应用配置';

COMMENT ON COLUMN "T_APP_STORE_PATCH"."PKGNAME" IS '应用id';

COMMENT ON COLUMN "T_APP_STORE_PATCH"."LVERSION" IS '低版本';

COMMENT ON COLUMN "T_APP_STORE_PATCH"."HVERSION" IS '高版本';

COMMENT ON COLUMN "T_APP_STORE_PATCH"."SOURCE" IS '应用安装包（上传.patch文件）';

COMMENT ON COLUMN "T_APP_STORE_PATCH"."CREATETIME" IS '创建时间';

CREATE INDEX "IDX_T_APP_STORE_DEVICE_STATUS"
ON "T_APP_STORE_DEVICE"("STATUS");

CREATE INDEX "IDX_T_APP_STORE_DEVICE_APPPUSHID"
ON "T_APP_STORE_DEVICE"("APPPUSHID");

COMMENT ON TABLE "T_APP_STORE_DEVICE" IS '应用分发设备关联表';

COMMENT ON COLUMN "T_APP_STORE_DEVICE"."ID" IS 'uuid';

COMMENT ON COLUMN "T_APP_STORE_DEVICE"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_APP_STORE_DEVICE"."APPSTOREID" IS '应用id';

COMMENT ON COLUMN "T_APP_STORE_DEVICE"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_APP_STORE_DEVICE"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_APP_STORE_DEVICE"."STATUS" IS '1:未分发，2:已分发，3:正在下载，4:下载失败，5:等待安装，6:正在安装，7:已安装，8:用户拒绝，9:用户卸载/已删除，10:安装失败，11:更新';

COMMENT ON COLUMN "T_APP_STORE_DEVICE"."SAFECONTAINERSTATUS" IS '安全容器的状态  1：启用，0：禁用；默认为1';

COMMENT ON COLUMN "T_APP_STORE_DEVICE"."APPCONFSTATUS" IS '应用配置执行状态,0--未生效;1--已生效';

COMMENT ON COLUMN "T_APP_STORE_DEVICE"."ENABLED" IS '1 启用 2 禁用 默认启用';

COMMENT ON COLUMN "T_APP_STORE_DEVICE"."ESSENTIALAPP" IS '是否系统客户端应用：必装应用： 1 必装 默认 0';

COMMENT ON COLUMN "T_APP_STORE_DEVICE"."APPPUSHID" IS '应用推送ID';

COMMENT ON COLUMN "T_APP_STORE_DEVICE"."APPCONF" IS '应用配置';

COMMENT ON COLUMN "T_APP_STORE_DEVICE"."ISINPUTKNOX" IS '是否放入KNOX容器内 (0：否 1：是 默认否)';

COMMENT ON COLUMN "T_APP_STORE_DEVICE"."ISUEMCONTAINER" IS '是否放入UEM容器';

COMMENT ON TABLE "T_APP_STORE_CONF" IS '应用配置表';

COMMENT ON COLUMN "T_APP_STORE_CONF"."ID" IS '配置id';

COMMENT ON COLUMN "T_APP_STORE_CONF"."NAME" IS '名称';

COMMENT ON COLUMN "T_APP_STORE_CONF"."DESCRIPTION" IS '描述';

COMMENT ON COLUMN "T_APP_STORE_CONF"."LOGINID" IS '用户id';

COMMENT ON COLUMN "T_APP_STORE_CONF"."TYPE" IS '1--普通策略;2--wrapping策略;3--安全桌面;4--安全容器;5--安全浏览器;6--杀毒;7--远程控制;';

COMMENT ON COLUMN "T_APP_STORE_CONF"."APPCONF" IS '应用配置-推送时使用';

COMMENT ON COLUMN "T_APP_STORE_CONF"."JSONCONF" IS '应用配置-编辑时使用';

COMMENT ON COLUMN "T_APP_STORE_CONF"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_APP_STORE_CONF"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_APP_STORE_CONF"."COPYNUM" IS '应用策略复制编号';

COMMENT ON COLUMN "T_APP_STORE_CONF"."FLAG" IS '是否是默认应用策略：0否 1是 默认0';

CREATE INDEX "APPCATEGORYID"
ON "T_APP_STORE_CATEGORY"("APPCATEGORYID");

COMMENT ON TABLE "T_APP_STORE_CATEGORY" IS '应用商店分类表';

COMMENT ON COLUMN "T_APP_STORE_CATEGORY"."APPSTOREID" IS '应用商店id';

COMMENT ON COLUMN "T_APP_STORE_CATEGORY"."APPCATEGORYID" IS '应用分类id';

COMMENT ON TABLE "T_APP_STORE_APPINFO" IS '应用信息表';

COMMENT ON COLUMN "T_APP_STORE_APPINFO"."ID" IS 'id';

COMMENT ON COLUMN "T_APP_STORE_APPINFO"."APP_VERSION" IS '应用版本';

COMMENT ON COLUMN "T_APP_STORE_APPINFO"."APP_NAME" IS '应用名称';

COMMENT ON COLUMN "T_APP_STORE_APPINFO"."APP_PACKAGE" IS '应用包名';

COMMENT ON COLUMN "T_APP_STORE_APPINFO"."APP_ICON" IS '应用icon';

COMMENT ON COLUMN "T_APP_STORE_APPINFO"."APP_SIZE" IS '应用大小';

COMMENT ON COLUMN "T_APP_STORE_APPINFO"."APP_TYPE" IS '应用类型';

COMMENT ON COLUMN "T_APP_STORE_APPINFO"."APP_FROM" IS '应用来源';

COMMENT ON COLUMN "T_APP_STORE_APPINFO"."APP_URL" IS '应用下载地址';

COMMENT ON COLUMN "T_APP_STORE_APPINFO"."APP_DESC" IS '应用描述';

COMMENT ON COLUMN "T_APP_STORE_APPINFO"."PLATFORM" IS '应用平台';

COMMENT ON COLUMN "T_APP_STORE_APPINFO"."CREATE_TIME" IS '创建时间';

COMMENT ON COLUMN "T_APP_STORE_APPINFO"."UPDATE_TIME" IS '修改时间';

CREATE INDEX "PKGNAME_INDEX"
ON "T_APP_STORE"("PKGNAME");

CREATE INDEX "FK_T_APP_STORE_LOGINID"
ON "T_APP_STORE"("LOGINID");

CREATE INDEX "PLATFORM_INDEX"
ON "T_APP_STORE"("PLATFORM");

COMMENT ON TABLE "T_APP_STORE" IS '应用商店';

COMMENT ON COLUMN "T_APP_STORE"."NAME" IS '名称';

COMMENT ON COLUMN "T_APP_STORE"."PKGNAME" IS '应用id';

COMMENT ON COLUMN "T_APP_STORE"."VERSION" IS '版本';

COMMENT ON COLUMN "T_APP_STORE"."ICON" IS '图标';

COMMENT ON COLUMN "T_APP_STORE"."PRICE" IS '价格';

COMMENT ON COLUMN "T_APP_STORE"."APPSIZE" IS '大小';

COMMENT ON COLUMN "T_APP_STORE"."BRIEF" IS '软件简介';

COMMENT ON COLUMN "T_APP_STORE"."COMPANY" IS '开发商';

COMMENT ON COLUMN "T_APP_STORE"."ITUNESSTOREID" IS '苹果应用商店应用id';

COMMENT ON COLUMN "T_APP_STORE"."PLATFORM" IS '适合平台  0：表示其它，1：表示android, 2:表示ios，默认是1 ';

COMMENT ON COLUMN "T_APP_STORE"."SOURCE" IS '应用安装包（上传.ipa或.apk文件）';

COMMENT ON COLUMN "T_APP_STORE"."DOWNLOADCOUNT" IS '下载量';

COMMENT ON COLUMN "T_APP_STORE"."DISTRIBUTETYPE" IS '分发类型: 0 推送安装包 1 推送消息 2 不推送 ';

COMMENT ON COLUMN "T_APP_STORE"."TYPE" IS '应用分类: 1 企业 2 外部 默认1';

COMMENT ON COLUMN "T_APP_STORE"."STATUS" IS '是否可用: 0 可用 1 不可用 0 默认';

COMMENT ON COLUMN "T_APP_STORE"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_APP_STORE"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_APP_STORE"."OSVERSION" IS '要求系统版本';

COMMENT ON COLUMN "T_APP_STORE"."LOGINID" IS '用户id';

COMMENT ON COLUMN "T_APP_STORE"."MODELTYPE" IS 'MDM4.0.1开始设备型号允许多选,20-iphone 21-ipad 22-ipad mini 23-itouch';

COMMENT ON COLUMN "T_APP_STORE"."DESCRIPTION" IS '描述';

COMMENT ON COLUMN "T_APP_STORE"."CUSTOMVERSION" IS '自定义版本';

COMMENT ON COLUMN "T_APP_STORE"."DISTRIBUTEMODE" IS '推送模式字段（自动-0、按需-1）默认0';

COMMENT ON COLUMN "T_APP_STORE"."DEVICERELATIONSHIP" IS '设备所属关系（企业-1、员工-2、其他-3、全部-0）默认全部';

COMMENT ON COLUMN "T_APP_STORE"."DELAPP" IS '是否在淘汰设备时删除该应用(不删除-0、删除-1)默认不删除';

COMMENT ON COLUMN "T_APP_STORE"."PREVENTBACKUP" IS '是否防止应用程序备份(是-1、否-0)默认否';

COMMENT ON COLUMN "T_APP_STORE"."WIFI" IS '只在wifi情况下下载，0:所有情况下载  默认0';

COMMENT ON COLUMN "T_APP_STORE"."CHECKFLAG" IS '是否定时检查(0 否 1 是)';

COMMENT ON COLUMN "T_APP_STORE"."STARTTIME" IS '开始检测时间';

COMMENT ON COLUMN "T_APP_STORE"."CHECKPERIOD" IS '检测周期(单位分钟)';

COMMENT ON COLUMN "T_APP_STORE"."FLAG" IS '是否系统客户端应用：0否 1是 默认0';

COMMENT ON COLUMN "T_APP_STORE"."CLIENTTYPE" IS '客户端类型： 1 mcm 2 mdm 3 mem 4安全浏览器';

COMMENT ON COLUMN "T_APP_STORE"."FILENAME" IS '文件名';

COMMENT ON COLUMN "T_APP_STORE"."APPCONF" IS '应用配置';

COMMENT ON COLUMN "T_APP_STORE"."URLSCHEME" IS '用于IOS判断应用是否已经安装';

COMMENT ON COLUMN "T_APP_STORE"."VERSIONCODE" IS '应用版本编号';

COMMENT ON COLUMN "T_APP_STORE"."DOMAINTYPE" IS '应用类型（普通应用-0 双域应用-1 沙箱应用-2 内置应用-3）默认普通应用';

COMMENT ON COLUMN "T_APP_STORE"."FACETID" IS '上传应用时，ids生成的facetid';

COMMENT ON COLUMN "T_APP_STORE"."FILEHASH" IS '文件md5';

COMMENT ON COLUMN "T_APP_STORE"."SHOWWRAPPERICON" IS '是否显示沙箱应用图标 0否   1是 默认1';

COMMENT ON COLUMN "T_APP_STORE"."APPSOURCETYPE" IS '应用市场类型: 0 非google Play应用 1 google Play应用';

COMMENT ON COLUMN "T_APP_STORE"."AUDITCONTENT" IS '审核意见';

COMMENT ON TABLE "T_APP_SCHEDULE" IS '应用定时分发排程表';

COMMENT ON COLUMN "T_APP_SCHEDULE"."ID" IS 'uuid';

COMMENT ON COLUMN "T_APP_SCHEDULE"."APPID" IS '应用id';

COMMENT ON COLUMN "T_APP_SCHEDULE"."USERIDS" IS '用户ids';

COMMENT ON COLUMN "T_APP_SCHEDULE"."GROUPIDS" IS '用户组ids';

COMMENT ON COLUMN "T_APP_SCHEDULE"."JOBNAME" IS 'job name';

COMMENT ON COLUMN "T_APP_SCHEDULE"."JOBGROUP" IS 'job group';

COMMENT ON COLUMN "T_APP_SCHEDULE"."TRIGGERNAME" IS 'trigger name';

COMMENT ON COLUMN "T_APP_SCHEDULE"."TRIGGERGROUP" IS 'trigger group';

COMMENT ON COLUMN "T_APP_SCHEDULE"."CRONEXPRESSION" IS 'cron表达式';

COMMENT ON TABLE "T_APP_PUSH_USER_GROUP" IS '应用推送分发用户组流水表';

COMMENT ON COLUMN "T_APP_PUSH_USER_GROUP"."ID" IS 'uuid';

COMMENT ON COLUMN "T_APP_PUSH_USER_GROUP"."GROUPID" IS '用户组';

COMMENT ON COLUMN "T_APP_PUSH_USER_GROUP"."APPSTOREID" IS '应用id';

COMMENT ON COLUMN "T_APP_PUSH_USER_GROUP"."APPPUSHID" IS '应用推送ID';

COMMENT ON COLUMN "T_APP_PUSH_USER_GROUP"."ESSENTIALAPP" IS '是否系统客户端应用：必装应用： 1 必装 默认 0';

COMMENT ON TABLE "T_APP_PUSH_USER" IS '应用推送分发用户流水表';

COMMENT ON COLUMN "T_APP_PUSH_USER"."ID" IS 'uuid';

COMMENT ON COLUMN "T_APP_PUSH_USER"."USERID" IS '用户id';

COMMENT ON COLUMN "T_APP_PUSH_USER"."APPSTOREID" IS '应用id';

COMMENT ON COLUMN "T_APP_PUSH_USER"."ESSENTIALAPP" IS '是否系统客户端应用：必装应用： 1 必装 默认 0';

COMMENT ON COLUMN "T_APP_PUSH_USER"."APPPUSHID" IS '应用推送ID';

COMMENT ON TABLE "T_APP_PUSH" IS '应用推送';

COMMENT ON COLUMN "T_APP_PUSH"."ID" IS '推送id';

COMMENT ON COLUMN "T_APP_PUSH"."APPSTOREID" IS '应用id';

COMMENT ON COLUMN "T_APP_PUSH"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_APP_PUSH"."APPCONF" IS '应用配置';

COMMENT ON COLUMN "T_APP_PUSH"."LOGINID" IS '用户id';

COMMENT ON COLUMN "T_APP_PUSH"."DISTRIBUTEMODE" IS '推送模式字段（必装-0、按需-1）默认0';

COMMENT ON COLUMN "T_APP_PUSH"."DEVICERELATIONSHIP" IS '设备所属关系（企业-1、员工-2、其他-3、全部-0）默认全部';

COMMENT ON COLUMN "T_APP_PUSH"."DELAPP" IS '是否在淘汰设备时删除该应用(不删除-0、删除-1)默认不删除';

COMMENT ON COLUMN "T_APP_PUSH"."WIFI" IS '只在wifi情况下下载，0:所有情况下载  默认0';

COMMENT ON COLUMN "T_APP_PUSH"."STARTTIME" IS '开始检测时间';

COMMENT ON COLUMN "T_APP_PUSH"."DISTRIBUTETYPE" IS '分发类型: 0 推送安装包 1 推送消息 2 不推送 ';

COMMENT ON COLUMN "T_APP_PUSH"."ESSENTIALAPP" IS '是否开启合规检测 (是-1 否-0) 默认0';

COMMENT ON COLUMN "T_APP_PUSH"."PREVENTBACKUP" IS '是否防止应用程序备份(是-1、否-0)默认否';

COMMENT ON COLUMN "T_APP_PUSH"."ISINPUTKNOX" IS '是否放入KNOX容器内 (0：否 1：是 默认否)';

COMMENT ON COLUMN "T_APP_PUSH"."APPCONFID" IS '应用配置ID';

COMMENT ON COLUMN "T_APP_PUSH"."ISUEMCONTAINER" IS '是否放入UEM容器,为了升级考虑设置默认值为0';

COMMENT ON COLUMN "T_APP_PUSH"."SHOWICONONSYSDESKTOP" IS '是否在系统桌面显示图标';

COMMENT ON COLUMN "T_APP_PUSH"."PREVENTUNINSTALL" IS '应用防卸载，1-开启 0-关闭';

COMMENT ON COLUMN "T_APP_OPERATION"."TYPE" IS '操作类型';

COMMENT ON COLUMN "T_APP_OPERATION"."DESCRIPTION" IS '操作描述';

CREATE INDEX "IDX_DOWNLOAD_LOG"
ON "T_APP_DOWNLOAD_LOG"("DOWNLOADTIME");

COMMENT ON TABLE "T_APP_DOWNLOAD_LOG" IS '记录应用的下载日志';

COMMENT ON COLUMN "T_APP_DOWNLOAD_LOG"."APPID" IS '应用id';

COMMENT ON COLUMN "T_APP_DOWNLOAD_LOG"."NAME" IS '应用名称';

COMMENT ON COLUMN "T_APP_DOWNLOAD_LOG"."DEVICEID" IS '设备id';

COMMENT ON COLUMN "T_APP_DOWNLOAD_LOG"."DOWNLOADTIME" IS '下载时间';

COMMENT ON TABLE "T_APP_CATEGORY" IS '应用分类表';

COMMENT ON COLUMN "T_APP_CATEGORY"."NAME" IS '分类名称';

COMMENT ON COLUMN "T_APP_CATEGORY"."DESCRIPTION" IS '分类描述';

COMMENT ON COLUMN "T_APP_CATEGORY"."PARENTID" IS '父节点';

COMMENT ON COLUMN "T_APP_CATEGORY"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_APP_CATEGORY"."UPDATETIME" IS '修改时间';

COMMENT ON COLUMN "T_APP_CATEGORY"."TYPE" IS '分类标识: 0 内部分类 1 外部分类 默认0';

COMMENT ON COLUMN "T_APP_CATEGORY"."LOGINID" IS '管理员id';

CREATE INDEX "IDX_PROFILE_UUID"
ON "T_APPLE_DEVICE_PROFILE"("DEPPROFILEUUID");

COMMENT ON TABLE "T_APPLE_DEVICE_PROFILE" IS 'apple Dep 设备-策略表';

COMMENT ON COLUMN "T_APPLE_DEVICE_PROFILE"."SERIALNUMBER" IS 'dep设备序列号';

COMMENT ON COLUMN "T_APPLE_DEVICE_PROFILE"."DEPPROFILEUUID" IS '策略uuid';

COMMENT ON COLUMN "T_APPLE_DEVICE_PROFILE"."CREATETIME" IS '分配时间';

COMMENT ON COLUMN "T_APPLE_DEVICE_PROFILE"."UPDATETIME" IS '更新时间';

CREATE INDEX "IDX_UUID"
ON "T_APPLE_DEP_PROFILE"("UUID");

CREATE INDEX "IDX_PROFILE_NAME"
ON "T_APPLE_DEP_PROFILE"("PROFILENAME");

COMMENT ON TABLE "T_APPLE_DEP_PROFILE" IS 'apple Dep 策略表';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."UUID" IS '策略uuid';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."DESCRIPTION" IS '描述';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."PROFILENAME" IS '策略名称';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."URL" IS 'MDM服务器URL';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."SUPPORTPHONENUMBER" IS '联系电话';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."SUPPORTEMAILADDRESS" IS '邮件地址';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."ORGMAGIC" IS '组织标识';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."DEPARTMENT" IS '部门名称';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."LANGUAGE" IS 'tvOS语言';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."REGION" IS 'tvOS国家码';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."ANCHORCERTS" IS '受信证书文件名';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."SUPERVISINGHOSTCERTS" IS '监管模式匹配证书文件名';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."SKIPSETUPITEMS" IS '开机跳过设置项';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."ALLOWPAIRING" IS '证书匹配 0-不匹配 1-匹配';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."ISSUPERVISED" IS '是否开启监管模式 0-不开启 1-开启';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."ISMULTIUSER" IS '只对Apple School Manager生效,用户设备共享 0-不共享 1-共享';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."ISMANDATORY" IS '策略强制生效 0-非强制 1-强制';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."AWAITDEVICECONFIGURED" IS '监管模式下有效 0-不等待MDM配置确认 1-等待MDM配置确认';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."ISMDMREMOVABLE" IS '策略是否可移除 0-不可移除 1-可移除';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."AUTOADVANCESETUP" IS 'tvOS自动配置选项 0-不开启 1-开启';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."LOGINID" IS '创建人';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."STATUS" IS '策略状态 0-无效 1-有效';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."CREATOR" IS '创建人姓名';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_APPLE_DEP_PROFILE"."UPDATETIME" IS '更新时间';

CREATE INDEX "INDEX_UNIQUE_KEY"
ON "T_APPLE_DEP_DEVICE"("SERIALNUMBER");

COMMENT ON TABLE "T_APPLE_DEP_DEVICE" IS 'apple Dep 设备表';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."USERID" IS '用户id';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."UUID" IS 'UUID';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."SERIALNUMBER" IS '序列号';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."DEVICEFAMILY" IS '设备类型:iPad iPhone iPod Mac AppleTV';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."ASSETTAG" IS '资产编号:当从苹果购买设备时才有';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."MODEL" IS '型号';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."OS" IS '操作系统';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."COLOR" IS '颜色';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."DESCRIPTION" IS '描述';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."STATUS" IS '设备状态: -1-删除;1-有效;';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."PROFILEUUID" IS '策略id';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."PROFILEASSIGNTIME" IS '策略创建时间';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."PROFILEPUSHTIME" IS '策略推送时间';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."PROFILESTATUS" IS '策略状态:empty assigned pushed removed';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."DEVICEASSIGNEDBY" IS '设备所有人';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."DEVICEASSIGNEDDATE" IS '设备注册时间';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."CREATETIME" IS '创建时间';

COMMENT ON COLUMN "T_APPLE_DEP_DEVICE"."UPDATETIME" IS '更新时间';

COMMENT ON COLUMN "T_API_DICT"."CODE" IS '功能码';

COMMENT ON COLUMN "T_API_DICT"."DESCR" IS '描述';

COMMENT ON COLUMN "T_API_DICT"."METHOD" IS 'url请求类型：POST PUT DELETE GET *';

COMMENT ON COLUMN "T_API_DICT"."MATCHRULE" IS '匹配规则 0-全部匹配 1-开始匹配 2-正则匹配';

COMMENT ON TABLE "T_ADMIN_LIST_DEFAULT" IS '管理平台默认列表字段表';

COMMENT ON COLUMN "T_ADMIN_LIST_DEFAULT"."ID" IS 'uuid';

COMMENT ON COLUMN "T_ADMIN_LIST_DEFAULT"."LISTID" IS '列表id';

COMMENT ON COLUMN "T_ADMIN_LIST_DEFAULT"."FIELDNAME" IS '字段名';

COMMENT ON COLUMN "T_ADMIN_LIST_DEFAULT"."PRIORITYNO" IS '优先级序号';

COMMENT ON COLUMN "T_ADMIN_LIST_DEFAULT"."DISPLAYFLAG" IS '是否显示标识,0---否;1---是';

COMMENT ON COLUMN "T_ADMIN_LIST_DEFAULT"."ORDERBYFLAG" IS '是否排序标识,0--否;1---是';

COMMENT ON TABLE "T_ADMIN_LIST_CUSTOM" IS '管理平台自定义列表字段表';

COMMENT ON COLUMN "T_ADMIN_LIST_CUSTOM"."ID" IS 'uuid';

COMMENT ON COLUMN "T_ADMIN_LIST_CUSTOM"."LOGINID" IS '用户名';

COMMENT ON COLUMN "T_ADMIN_LIST_CUSTOM"."LISTID" IS '列表id';

COMMENT ON COLUMN "T_ADMIN_LIST_CUSTOM"."FIELDNAME" IS '字段名';

COMMENT ON COLUMN "T_ADMIN_LIST_CUSTOM"."PRIORITYNO" IS '优先级序号';

COMMENT ON COLUMN "T_ADMIN_LIST_CUSTOM"."DISPLAYFLAG" IS '是否显示标识,0---否;1---是';

COMMENT ON COLUMN "T_ADMIN_LIST_CUSTOM"."ORDERBYFLAG" IS '是否排序标识,0--否;1---是';

COMMENT ON COLUMN "T_ACCESSWEB_RESTRICTION"."GROUPNAME" IS '组名称';

COMMENT ON COLUMN "T_ACCESSWEB_RESTRICTION"."APPNAME" IS '应用名称';

COMMENT ON COLUMN "T_ACCESSWEB_RESTRICTION"."UPDATESTATUS" IS '更新状态(0：未更新，1：已更新)';
-- comment end
-- function start
create or replace function "FIND_IN_SET"(childStr in varchar2, srcStr in varchar2) return number is
    resultNum number(10);

    tempStr varchar2(4000) := srcStr;
    compareStr varchar2(100);
    dotIndex number(10);
    tempIndex number(10) := 0;

begin

    resultNum := 0;

    --字符串是否为空
    if  childStr is null or childStr == '' or srcStr is null or srcStr == '' then
        return 0;
    end if;

    loop
        tempIndex := tempIndex + 1;
        dotIndex := INSTR(tempStr,',');

        if dotIndex < 1 then
           if childStr = tempStr then
               resultNum := tempIndex;
           end if;
           exit;
        end if;

        compareStr := SUBSTR(tempStr,1,dotIndex - 1);
        tempStr := SUBSTR(tempStr, dotIndex  +1, LENGTH(tempStr) - LENGTH(compareStr));

        if childStr = compareStr then
            resultNum := tempIndex;
            exit;
        end if;

    end loop;

    return(resultNum);

end FIND_IN_SET;
/

create or replace function "F_GETGROUPCHILDLIST"(rootIds in varchar2) return varchar2 is

  childrenIds varchar2(10000);
  dotIndex number(10);

  tempGroupId varchar2(32);
  tempRootIds varchar(2000);
  tempResult varchar2(2000);

begin

    -- 判断传入的参数是否为空
    if  rootIds is null or LENGTH(rootIds) < 1 then
        return rootIds;
    end if;

    tempRootIds := rootIds;

    loop
        dotIndex := INSTR(tempRootIds,',');

        if dotIndex < 1 then
          tempGroupId := tempRootIds;
        else
           tempGroupId := SUBSTR(tempRootIds,1,dotIndex - 1);
        end if;

       -- 递归查询tempGroupId所有的子组
       select wmsys.wm_concat(TO_CHAR(t.id)) into tempResult from T_GROUP t
                        start with t.parentid = tempGroupId  connect by prior t.id = t.parentid;

       if tempResult is not null and tempResult != '' then
          if childrenIds is null or childrenIds == '' then
            childrenIds := tempResult;
          else
            childrenIds := CONCAT(CONCAT(childrenIds,','),tempResult);
          end if;
       end if;

       if dotIndex < 1 then
         exit;
       else
         tempRootIds := SUBSTR(tempRootIds, dotIndex  +1, LENGTH(tempRootIds) - LENGTH(tempGroupId));
       end if;

    end loop;


    if childrenIds is not null and  LENGTH(childrenIds) > 0 then
        childrenIds :=  CONCAT(CONCAT(rootIds,','),childrenIds);
    else
        childrenIds :=  rootIds;
    end if;

    return(childrenIds);

end f_getGroupChildList;
/

create or replace function "F_GETGROUPCHILDREN_BY_GROUP_ID"(rootId in number) return varchar2 is

  childrenIds varchar2(10000);

begin

  select wmsys.wm_concat(TO_CHAR(t.id)) into childrenIds from T_GROUP t
                          start with t.parentid = rootId  connect by prior t.id = t.parentid;

  return(childrenIds);

end f_getGroupChildren_by_group_id;

/
create or replace function f_getGuid(guid in varchar2) return varchar2 is
  resultGuid varchar2(256);
  guidLength number(10);
begin

   if guid is null then
       return '';
   end if;

   resultGuid := RTRIM( guid, '0');
   guidLength := LENGTH(resultGuid);

   if guidLength=1 or guidLength=3 or guidLength=5 or guidLength=8 or guidLength=11 or guidLength=13 then
      resultGuid:=resultGuid||'0';
   elsif guidLength=7 or guidLength=10 then
     resultGuid:=resultGuid||'00';
   end if;

   return(resultGuid);

end f_getGuid;
/

create or replace function "F_GETPARENTADMINLIST"(loginId in varchar2) return varchar2 is

  parentIds varchar2(4000) := loginid;
  tempLoginId varchar2(200) := loginid;

begin

  while tempLoginId is not null
  loop

     SELECT su.parentId INTO tempLoginId FROM t_sys_user su WHERE su.loginId = tempLoginId;

     if  tempLoginId is not null then
       parentIds :=CONCAT(CONCAT(tempLoginId,','),parentIds);
     end if;

  end loop;

  return(parentIds);

end F_GETPARENTADMINLIST;
/

create or replace function F_SUPER_HRGROUPS (hrgroupId in nvarchar2)
-- Desc: calculate the superior groups of a given group, including this group itself
-- Input: a group given by its hrGroupId
-- Output: a list of hrGroupId of the superior groups and the given group itself, separated by ','
-- Example: F_SUPER_HRGROUPS('1001100210031004') =
--        ('1001','10011002','100110021003','1001100210031004')
 return TYPE_HRGROUPID_TAB
 is
  lsGroup TYPE_HRGROUPID_TAB := TYPE_HRGROUPID_TAB();
  tempHrGroup nvarchar2(128);
  lastlen number;
 begin

  if hrgroupId is null then
     return null;
  end if;

  lastlen := 0;
  tempHrGroup := SUBSTR(hrgroupId, 1, 4);

  while lastlen < LENGTH(hrgroupId)
  loop
    lsGroup.Extend();
    lsGroup(lsGroup.last) := tempHrGroup;
    lastlen := LENGTH(tempHrGroup);
    tempHrGroup := SUBSTR(hrgroupId, 1, lastlen+4);
  end loop;

  return(lsGroup);
 end F_SUPER_HRGROUPS;
/

CREATE OR REPLACE FUNCTION long_next_id(seqname IN VARCHAR)
    RETURN NUMBER
    IS next_seq NUMBER(20);
    sql_stmt VARCHAR(2000);
    shard_id NUMBER(20);
    current_milli_seconds NUMBER(20);
    current_timestamp timestamp;
    BEGIN
        --53位id,40 timestamp + 7 shard id + 6 seq
        --shardId < 128 2^7
        shard_id := 0;
        sql_stmt := 'select '||seqname||'_ID_SEQ.nextval from dual';
        EXECUTE IMMEDIATE sql_stmt into next_seq ;
        current_timestamp :=  SYSTIMESTAMP;
        ---from 2013-01-01
        current_milli_seconds := ROUND (((TRUNC(current_timestamp, 'MI')-DATE '1970-01-01')*24*60*60) + EXTRACT(SECOND FROM current_timestamp),3)*1000 - 1356969660000 ;
        --
        current_milli_seconds := current_milli_seconds*power(2,13);
        --41位timetsamp,11 shardId,11位 自增长id
        shard_id := shard_id*power(2,7);
        --自增seq < 64 2^6
        next_seq := MOD(next_seq,64);
        --bit or
        next_seq :=  (shard_id + next_seq) - BITAND(shard_id, next_seq);
        next_seq := (current_milli_seconds+next_seq) - BITAND(current_milli_seconds, next_seq);


        RETURN(next_seq);
   END;
/

CREATE OR REPLACE FUNCTION next_id(seqname IN VARCHAR)
    RETURN NUMBER
    IS next_seq NUMBER(20);
    sql_stmt VARCHAR(2000);
    shard_id NUMBER(20);
    current_milli_seconds NUMBER(20);
    current_timestamp timestamp;
    BEGIN
        --shardId < 128 2^6
        shard_id := 0;
        sql_stmt := 'select '||seqname||'_ID_SEQ.nextval from dual';
        EXECUTE IMMEDIATE sql_stmt into next_seq ;
        shard_id := shard_id*power(2,24);
        --自增seq <  2^24
        next_seq := MOD(next_seq,16777216);
        --bit or
        next_seq :=  (shard_id + next_seq) - BITAND(shard_id, next_seq);


        RETURN(next_seq);
   END;
/

create or replace function groupmapcat(tpg_groupId  in number, split_tag in varchar2) return varchar2 is
  resultStr varchar2(4000);

  n number(10) := 0;

  cursor c_job
       is
       select hrGroupId from t_group_map where groupId = tpg_groupId;

   c_row c_job%rowtype;

begin

   for c_row in c_job loop
      if n = 0 then
        resultStr := c_row.hrGroupId;
      else
        resultStr := split_tag || c_row.hrGroupId;
      end if;
      n := n + 1;
   end loop;

  return(resultStr);
end groupmapcat;
/
-- function end
-- insert start
insert into "t_group"(id,parentId,name,descr,creatTime) values(-1,0,'我的公司','Custom Root Group',now());
insert into "t_group"(id,parentId,name,descr,creatTime) values(-2,-1,'默认组','Default Group',now());

insert into "t_group_map"(groupId,hrGroupId) values(-1,'0001');
insert into "t_group_map"(groupId,hrGroupId) values(-2,'00010001');


INSERT INTO "t_sys_user"(loginId,name,password,flag) values('admin','超级管理员','1bc2ae89ada7eee62d9c149ea744f7d8',10);
-- INSERT INTO "t_sys_user"(loginId,name,password,flag) values('${user}','Administrator',MD5('${password}'),10);

-- ----------------------------
-- 初始化系统菜单数据
-- ----------------------------
INSERT INTO "t_sys_menu" VALUES ('10', 'NULL', '1', '1', 'top.menu.self.device', '', '/common/showDeviceHome.do');
INSERT INTO "t_sys_menu" VALUES ('1001', '10', '0', '2', 'left.menu.admin.device.device', '/device', '/device/query/showDeviceList.do');
INSERT INTO "t_sys_menu" VALUES ('1002', '10', '0', '2', 'left.menu.admin.device.asset', '/device/asset', '/device/asset/query/showAssetList.do');
INSERT INTO "t_sys_menu" VALUES ('1003', '10', '0', '2', 'left.menu.admin.device.registed', '/device/asset', '/device/asset/query/showRegisteredDeviceAssetList.do');
INSERT INTO "t_sys_menu" VALUES ('20', 'NULL', '1', '1', 'top.menu.admin.users', '', '/common/showUserHome.do');
INSERT INTO "t_sys_menu" VALUES ('2001', '20', '0', '2', 'left.menu.admin.users.user', '/user/deviceUser', '/user/deviceUser/query/userList.do');
INSERT INTO "t_sys_menu" VALUES ('2002', '20', '0', '2', 'left.menu.admin.users.group', '/user/deviceGroup', '/user/deviceGroup/query/groupList.do');
INSERT INTO "t_sys_menu" VALUES ('30', 'NULL', '1', '1', 'top.menu.admin.policy', 'NULL', '/common/showPolicyHome.do');
INSERT INTO "t_sys_menu" VALUES ('3001', '30', '0', '2', 'left.menu.admin.policy.config', '/policy', '/policy/query/queryPolicyIndex.do');
INSERT INTO "t_sys_menu" VALUES ('35', 'NULL', '1', '1', 'left.menu.admin.deviceRule.config', '', '/common/showDeviceRuleHome.do');
INSERT INTO "t_sys_menu" VALUES ('3501', '35', '0', '2', 'left.menu.admin.deviceRule.list', '/deviceRule', '/deviceRule/query/ruleList.do');
INSERT INTO "t_sys_menu" VALUES ('3502', '35', '0', '2', 'left.menu.admin.deviceRule.warnning', '/deviceRule', '/deviceRule/query/adminAlarmList.do');
-- INSERT INTO "t_sys_menu" VALUES ('40', 'NULL', '1', '1', 'mcm.menu.top.title', 'NULL', '/common/showContentHome.do');
-- INSERT INTO "t_sys_menu" VALUES ('4001', '40', '0', '2', 'mcm.menu.left.adminUpload', '/mcm/adminUpload', '/mcm/adminUpload/query/showAdminUploadHome.do');
-- INSERT INTO "t_sys_menu" VALUES ('4002', '40', '0', '2', 'mcm.menu.left.tagManage', '/mcm/tag', '/mcm/tag/query/showTagManageHome.do');
-- INSERT INTO "t_sys_menu" VALUES ('4003', '40', '0', '2', 'mcm.menu.left.dashboard', '/mcm/dashboard', '/mcm/dashboard/query/showDashboardHome.do');
INSERT INTO "t_sys_menu" VALUES ('50', 'NULL', '1', '1', 'top.menu.admin.app', 'NULL', '/common/showAppHome.do');
INSERT INTO "t_sys_menu" VALUES ('5001', '50', '0', '2', 'left.menu.admin.app.inhouse', '/app/inner', '/app/inner/query/applist.do?type=1');
INSERT INTO "t_sys_menu" VALUES ('5002', '50', '0', '2', 'left.menu.admin.app.outhouse', '/app/public', '/app/public/query/applist.do?'||'&'||'type=2');
INSERT INTO "t_sys_menu" VALUES ('5003', '50', '0', '2', 'left.menu.admin.app.category', '/app/category', '/app/category/query/viewCategoryList.do');
INSERT INTO "t_sys_menu" VALUES ('5004', '50', '0', '2', 'left.menu.admin.app.policy', '/app/blacklist', '/app/blacklist/query/appBlacklist.do');
INSERT INTO "t_sys_menu" VALUES ('5005', '50', '0', '2', 'left.menu.admin.app.statistics', '/app/report', '/app/report/query/brokeruleList.do');
INSERT INTO "t_sys_menu" VALUES ('60', 'NULL', '1', '1', 'top.menu.admin.eventlog', 'NULL', '/common/showEventlogHome.do');
INSERT INTO "t_sys_menu" VALUES ('6001', '60', '0', '2', 'left.menu.admin.eventlog.device', '/eventlog/device', '/eventlog/device/query/logList.do');
INSERT INTO "t_sys_menu" VALUES ('6002', '60', '0', '2', 'left.menu.admin.eventlog.user', '/eventlog/user', '/eventlog/user/query/logList.do');
INSERT INTO "t_sys_menu" VALUES ('6003', '60', '0', '2', 'left.menu.admin.eventlog.app', '/eventlog/app', '/eventlog/app/query/logList.do');
INSERT INTO "t_sys_menu" VALUES ('6004', '60', '0', '2', 'left.menu.admin.eventlog.auth', '/eventlog/signin', '/eventlog/signin/query/logList.do');
INSERT INTO "t_sys_menu" VALUES ('70', null, '1', '1', 'top.menu.admin.report', null, '/common/showReportHome.do');
INSERT INTO "t_sys_menu" VALUES ('7001', '70', '0', '2', 'sysmenu.sql.init.allReport', '/report', '/report/query/allReport.do');
INSERT INTO "t_sys_menu" VALUES ('7002', '70', '0', '2', 'sysmenu.sql.init.rss', '/rss', '/rss/query/allRss.do');
INSERT INTO "t_sys_menu" VALUES ('80', 'NULL', '1', '1', 'top.menu.admin.sysconf', '', '/common/showSysConfHome.do');
INSERT INTO "t_sys_menu" VALUES ('8001', '80', '1', '2', 'left.menu.admin.sysconf.authority', 'NULL', '');
INSERT INTO "t_sys_menu" VALUES ('800101', '8001', '0', '3', 'sysmenu.sql.init.account', '/sysconf/user', '/sysconf/user/query/userList.do');
INSERT INTO "t_sys_menu" VALUES ('800103', '8001', '0', '3', 'left.menu.admin.sysconf.role', '/sysconf/prem', '/authority/perm/query/premList.do');
insert into "t_sys_menu" (`code`, `parentCode`, `type`, `level`, `title`, `rootpath`, `url`) values('8002','80','1','2','top.menu.self.sysconf','NULL','');
-- insert into "t_sys_menu` (`code`, `parentCode`, `type`, `level`, `title`, `rootpath`, `url`) values('800201','8002','0','3','system.title.admin','/sysconf/sysAdminPlatform','/sysconf/sysAdminPlatform/query/showSysAdminPlatform.do');
insert into "t_sys_menu" (`code`, `parentCode`, `type`, `level`, `title`, `rootpath`, `url`) values('800204','8002','0','3','left.menu.admin.sysconf.mailserver','/sysconf/sysMail','/sysconf/sysMail/query/showSysMail.do');
insert into "t_sys_menu" (`code`, `parentCode`, `type`, `level`, `title`, `rootpath`, `url`) values('800208','8002','0','3','left.menu.admin.sysconf.registandactivate','/sysconf/sysRegsitAndActivate','/sysconf/sysRegsitAndActivate/query/showSysRegsitAndActivate.do');
-- INSERT INTO "t_sys_menu" VALUES ('8003', '80', '1', '2', 'left.menu.admin.sysconf.systool', '', '');
-- INSERT INTO "t_sys_menu" VALUES ('800301', '8003', '0', '3', 'left.menu.admin.sysconf.clearqueue', '/sysconf/sysQueue', '/sysconf/sysQueue/query/showSysQueue.do');
-- INSERT INTO "t_sys_menu" VALUES ('800302', '8003', '0', '3', 'left.menu.admin.sysconf.bakupOrRecover', '/sysconf/sysBakeupOrRecover', '/sysconf/sysBakeupOrRecover/query/showSysBakeupOrRecover.do');
-- INSERT INTO "t_sys_menu" VALUES ('800303', '8003', '0', '3', 'left.menu.admin.sysconf.shutdownandrestart', '/sysconf/sysShutdownRestart', '/sysconf/sysShutdownRestart/query/showSysShutdownAndRestart.do');
-- 添加应用子菜单：分发设置
-- INSERT INTO "t_sys_menu`(`code`, `parentCode`, `type`, `level`, `title`, `rootpath`, `url`) VALUES ('5006', '50', 0, 2, 'left.menu.admin.app.appconfig', '/app/config', '/app/config/query/configList.do');
  
INSERT INTO "t_policy"(id,payloadDisplayName,payloadIdentifier,payloadType,payloadOrganization,payloadDescription,payloadRemovalType,priority,policyType,platformType,loginId,creator,createTime,updateTime,ownerId) 
  values('c17132e0-9d69-4042-95da-a6aee6254549','nqsky','com.nqsky.profile','Configuration','${tenantindentifier}','${tenantindentifier}',0,1,10,2,'${user}','adminstrator',now(),now(),'${user}');
INSERT INTO "t_policy"(id,payloadDisplayName,payloadIdentifier,payloadType,payloadOrganization,payloadDescription,payloadRemovalType,priority,policyType,platformType,loginId,creator,createTime,updateTime,ownerId) 
  values('52d37f73-c2bd-4a01-947c-af3f9a8dbeef','Android default policy','com.nqsky.androidProfile','Configuration','${tenantindentifier}','${tenantindentifier}',0,1,11,1,'${user}','adminstrator',now(),now(),'${user}');
INSERT INTO "t_policy"(id,payloadDisplayName,payloadIdentifier,payloadType,payloadOrganization,payloadDescription,payloadRemovalType,priority,policyType,platformType,loginId,creator,createTime,updateTime,ownerId) 
  values('bf914f64-23d4-48f7-a9d4-6989d8e861a9','iOS default policy','com.nqsky.iosProfile','Configuration','${tenantindentifier}','${tenantindentifier}',0,1,11,2,'${user}','adminstrator',now(),now(),'${user}');
  

INSERT INTO "t_policy_scep"(id,uuid,payloadIdentifier,payloadType,url,name,subject,challenge,keyType,keyUsage,retries,retryDelay,keysize) 
  values('b4a4874d-5049-4367-967c-42b82fcf6f6a','c17132e0-9d69-4042-95da-a6aee6254549','{0}.scep1','com.apple.security.scep',
  'https://${ioshostname}/cgi-bin/pkiclient.exe','CA-IDENT','O=NetQin,CN=iDeviceCert','','RSA',5,3,10,1024);

INSERT INTO "t_policy_mdm"(id,uuid,payloadIdentifier,payloadType,serverURL,checkInURL,topic,identityCertificateUUID,signMessage,checkOutWhenRemoved,useDevelopmentAPNS,accessRights)
   values('8751d6f1-14f3-4150-ba1f-b71595b111fb','c17132e0-9d69-4042-95da-a6aee6254549','{0}.mdm1','com.apple.mdm','https://${ioshostname}/iosapp/server?tenan"t_id=${database}',
   'https://${ioshostname}/iosapp/checkin?tenan"t_id=${database}','com.apple.mgmt.External.ab2551fb-e059-4313-81b7-dda82cfe2f4d','b4a4874d-5049-4367-967c-42b82fcf6f6a',1,1,0,8191);
   
   
INSERT INTO "t_policy"(id,payloadDisplayName,payloadIdentifier,payloadType,payloadOrganization,payloadDescription,payloadRemovalType,priority,policyType,platformType,loginId,creator,createTime,updateTime,ownerId) 
  values('85e59e4c-bd06-414f-a531-b21c6e49e8fc','Android enableCamera default policy','com.nqsky.androidEnableCameraProfile','Configuration','${tenantindentifier}','${tenantindentifier}',0,1,10,1,'${user}','adminstrator',now(),now(),'${user}');
INSERT INTO "t_policy"(id,payloadDisplayName,payloadIdentifier,payloadType,payloadOrganization,payloadDescription,payloadRemovalType,priority,policyType,platformType,loginId,creator,createTime,updateTime,ownerId) 
  values('d93cb925-92cb-4773-a4da-594387d0720b','iOS enableCamera default policy','com.nqsky.iosEnableCameraProfile','Configuration','${tenantindentifier}','${tenantindentifier}',0,1,10,2,'${user}','adminstrator',now(),now(),'${user}');
INSERT INTO "t_policy_restrictions"(id,uuid,allowCamera,allowSdCard) values('53179134-afcc-49a1-9246-63d1c955652b','85e59e4c-bd06-414f-a531-b21c6e49e8fc',0,0);
INSERT INTO "t_policy_restrictions"(id,uuid,payloadIdentifier,payloadType,allowCamera,allowVideoConferencing) values('46bd1477-1a5f-4bf6-9458-5970bdfea364','d93cb925-92cb-4773-a4da-594387d0720b','{0}.restrictions1','com.apple.applicationaccess',0,0);
   
   
   
INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('e9fcd518-d3d6-4a44-8424-835ff33cdc12','deviceList','lastOnlineTime',1,1,1);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('fa7eaff5-beae-4c76-93f9-fbb6f9b8386a','deviceList','deviceName',2,1,1);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('6f2c779e-a5ba-4e23-b281-e393f9e7bb89','deviceList','relationship',3,1,0);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('f81bab71-6656-435c-bbc9-9121237efe1b','deviceList','userName',4,1,1);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('2cadc71a-b5bd-4e26-9f76-d0c2e57edb78','deviceList','model',5,1,0);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('b88eb339-9a7e-4448-bbc5-909299f62c1c','deviceList','type',6,1,0);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('66afe70b-3985-4038-8c77-33302574e865','deviceList','versioNum',7,1,0);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('42f40605-52da-4939-a98b-cdcaadd7a112','deviceList','policyStatus',8,1,0);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('21da7d09-7f04-4ba7-8e2b-b281977a5dbb','deviceList','status',9,1,0);


INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('627b2673-1532-4c98-8456-c8663d10c9ee','deviceList','activateTime',11,0,1);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('6d3367a4-4cc9-4777-a4d9-0bcc5060bbef','deviceList','serialNum',12,0,1);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('fbd2089f-90ff-4b06-b88f-778a20bb674e','deviceList','imei',13,0,1);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('c5468904-c928-4de6-999a-a26e89463a34','deviceList','phoneCode',14,0,1);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('30a36069-256d-483b-9a38-acf78fd2c314','deviceList','groupName',15,0,0);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('a8e0bfa1-c919-4693-bbb7-a1bacc01c3b9','deviceList','loginId',16,0,1);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('aef95823-7110-4aaa-a93b-cd8c66e18f0a','deviceList','mail',17,0,0);


INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('80c2d432-7e29-474e-97be-f9469c2a4f1d','assetList','deviceName',1,1,1);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('5bfdc8f9-2171-4110-a1e6-0d89e8e04a07','assetList','relationship',2,1,0);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('3729ba69-c733-4e35-aec1-2f1ce6d64ba7','assetList','userName',3,1,1);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('c3f60ee1-24ad-460a-bb5c-b07433525a71','assetList','model',4,1,0);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('289017a0-5e70-4ca2-8f99-f348b2243842','assetList','type',5,1,0);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('c82ba2f9-4ee4-4d99-a722-1cf76dba3b72','assetList','versioNum',6,1,0);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('a1f3962e-8118-403a-a70a-25ff9b730b13','assetList','status',7,1,0);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('3dd28458-8b25-48ab-9586-96d91f61a1c1','assetList','activateTime',8,1,0);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('83085062-742f-45a0-9831-269eb48e858c','assetList','remark',9,1,0);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('2517b73f-b54e-43b7-b909-0b3f96f1e8c3','assetList','eliminateTime',10,0,1);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('e86c7722-9992-49e7-b8f3-fb416201ac02','assetList','serialNum',11,0,0);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('fe95c3ec-65d3-4936-8031-c51fa38c697c','assetList','imei',12,0,1);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('dc4ecdb3-f8a1-4020-a590-a59b25d20b2d','assetList','phoneCode',13,0,0);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('a737c740-9970-4550-b835-412e809c73c9','assetList','groupName',14,0,0);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('ef71b715-a28d-4697-bb6c-ff61af0f4696','assetList','loginId',15,0,1);

INSERT INTO "t_admin_list_default"(id,listId,fieldName,priorityNo,displayFlag,orderByFlag)
VALUES('7b4f9167-496d-4255-a63c-b9e01eff8e6a','assetList','mail',16,0,0);


INSERT INTO "t_report" VALUES ('activeDeviceList', 'report.activeDeviceList.name', 'report.type.device', 'report.activeDeviceList.description');
INSERT INTO "t_report" VALUES ('assetList', 'report.assetList.name', 'report.type.device', 'report.assetList.description');
INSERT INTO "t_report" VALUES ('deviceList', 'report.deviceList.name', 'report.type.device', 'report.deviceList.description');
INSERT INTO "t_report" VALUES ('erasedDeviceList', 'report.erasedDeviceList.name', 'report.type.device', 'report.erasedDeviceList.description');
INSERT INTO "t_report" VALUES ('violationDeviceList','violationDeviceList.name','report.type.device','report.violationDeviceList.description');



INSERT INTO "t_perm_template" (id,name, description, sysflag, loginId) VALUES (1,'perm.template.device.name', 'perm.template.device.desc', 1, '${user}');
INSERT INTO "t_perm_template" (id,name, description, sysflag, loginId) VALUES (2,'perm.template.user.name', 'perm.template.user.desc', 1, '${user}');
INSERT INTO "t_perm_template" (id,name, description, sysflag, loginId) VALUES (3,'perm.template.policy.name', 'perm.template.policy.desc', 1, '${user}');
INSERT INTO "t_perm_template" (id,name, description, sysflag, loginId) VALUES (4,'perm.template.app.name', 'perm.template.app.desc', 1, '${user}');
INSERT INTO "t_perm_template" (id,name, description, sysflag, loginId) VALUES (7,'perm.template.report.name', 'perm.template.report.desc', 1, '${user}');

INSERT INTO "t_perm_template_menu" (templateId, code, authority) VALUES (1, 1001, 1);
INSERT INTO "t_perm_template_menu" (templateId, code, authority) VALUES (1, 1002, 1);
INSERT INTO "t_perm_template_menu" (templateId, code, authority) VALUES (1, 1003, 1);

INSERT INTO "t_perm_template_menu" (templateId, code, authority) VALUES (2, 2001, 1);
INSERT INTO "t_perm_template_menu" (templateId, code, authority) VALUES (2, 2002, 1);

INSERT INTO "t_perm_template_menu" (templateId, code, authority) VALUES (3, 3001, 1);
INSERT INTO "t_perm_template_menu" (templateId, code, authority) VALUES (3, 3501, 1);
INSERT INTO "t_perm_template_menu" (templateId, code, authority) VALUES (3, 3502, 1);

INSERT INTO "t_perm_template_menu" (templateId, code, authority) VALUES (4, 5001, 1);
INSERT INTO "t_perm_template_menu" (templateId, code, authority) VALUES (4, 5002, 1);
INSERT INTO "t_perm_template_menu" (templateId, code, authority) VALUES (4, 5003, 1);
INSERT INTO "t_perm_template_menu" (templateId, code, authority) VALUES (4, 5004, 1);
INSERT INTO "t_perm_template_menu" (templateId, code, authority) VALUES (4, 5005, 1);


INSERT INTO "t_perm_template_menu" (templateId, code, authority) VALUES (7, 7001, 1);
INSERT INTO "t_perm_template_menu" (templateId, code, authority) VALUES (7, 7002, 1);

INSERT INTO "t_app_store" (id,name,company,pkgname,version,size, platform, distributeType, type, status, createTime, updateTime, flag, clientType) 
VALUES (500,'MEM Client','nq', 'com.nq.com', '1.0','1940913', 1, 1, 1, 0, now(), now(), 1, 3);

-- ------------------------ iOS型号字典表数据初始化 -------------------------------
-- iPad 1 Models
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB292', 'iPad 1', 'Wi-Fi', 'iPad1,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB293', 'iPad 1', 'Wi-Fi', 'iPad1,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB294', 'iPad 1', 'Wi-Fi', 'iPad1,1', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC349', 'iPad 1', 'Wi-Fi + 3G(GSM)', 'iPad1,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC496', 'iPad 1', 'Wi-Fi + 3G(GSM)', 'iPad1,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC497', 'iPad 1', 'Wi-Fi + 3G(GSM)', 'iPad1,1', 'Black', '64G');

-- iPad 2 Models
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC769', 'iPad 2 ', 'Wi-Fi', 'iPad2,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC770', 'iPad 2', 'Wi-Fi', 'iPad2,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC916', 'iPad 2', 'Wi-Fi', 'iPad2,1', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC979', 'iPad 2', 'Wi-Fi', 'iPad2,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC980', 'iPad 2', 'Wi-Fi', 'iPad2,1', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC981', 'iPad 2', 'Wi-Fi', 'iPad2,1', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC773', 'iPad 2', 'Wi-Fi + 3G(GSM)', 'iPad2,2', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC774', 'iPad 2', 'Wi-Fi + 3G(GSM)', 'iPad2,2', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC775', 'iPad 2', 'Wi-Fi + 3G(GSM)', 'iPad2,2', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC982', 'iPad 2', 'Wi-Fi + 3G(GSM)', 'iPad2,2', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC983', 'iPad 2', 'Wi-Fi + 3G(GSM)', 'iPad2,2', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC984', 'iPad 2', 'Wi-Fi + 3G(GSM)', 'iPad2,2', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC755', 'iPad 2', 'Wi-Fi + 3G(CDMA)', 'iPad2,3', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC763', 'iPad 2', 'Wi-Fi + 3G(CDMA)', 'iPad2,3', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC764', 'iPad 2', 'Wi-Fi + 3G(CDMA)', 'iPad2,3', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC985', 'iPad 2', 'Wi-Fi + 3G(CDMA)', 'iPad2,3', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC986', 'iPad 2', 'Wi-Fi + 3G(CDMA)', 'iPad2,3', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC987', 'iPad 2', 'Wi-Fi + 3G(CDMA)', 'iPad2,3', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC954', 'iPad 2', 'Wi-Fi Rev A', 'iPad2,4', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC989', 'iPad 2', 'Wi-Fi Rev A', 'iPad2,4', 'White', '16G');

-- iPad 3 Models
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC705', 'iPad 3', 'Wi-Fi', 'iPad3,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD333', 'iPad 3', 'Wi-Fi', 'iPad3,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC706', 'iPad 3', 'Wi-Fi', 'iPad3,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD334', 'iPad 3', 'Wi-Fi', 'iPad3,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC707', 'iPad 3', 'Wi-Fi', 'iPad3,1', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD328', 'iPad 3', 'Wi-Fi', 'iPad3,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD329', 'iPad 3', 'Wi-Fi', 'iPad3,1', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD330', 'iPad 3', 'Wi-Fi', 'iPad3,1', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC733', 'iPad 3', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,2', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC744', 'iPad 3', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,2', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC756', 'iPad 3', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,2', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD363', 'iPad 3', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,2', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD364', 'iPad 3', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,2', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD365', 'iPad 3', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,2', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD366', 'iPad 3', 'Wi-Fi + Cellular(GSM)', 'iPad3,3', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD367', 'iPad 3', 'Wi-Fi + Cellular(GSM)', 'iPad3,3', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD368', 'iPad 3', 'Wi-Fi + Cellular(GSM)', 'iPad3,3', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD369', 'iPad 3', 'Wi-Fi + Cellular(GSM)', 'iPad3,3', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD370', 'iPad 3', 'Wi-Fi + Cellular(GSM)', 'iPad3,3', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD371', 'iPad 3', 'Wi-Fi + Cellular(GSM)', 'iPad3,3', 'White', '64G');

-- iPad 4 Models
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD510', 'iPad 4', 'Wi-Fi', 'iPad3,4', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD511', 'iPad 4', 'Wi-Fi', 'iPad3,4', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD512', 'iPad 4', 'Wi-Fi', 'iPad3,4', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME392', 'iPad 4', 'Wi-Fi', 'iPad3,4', 'Black', '128G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD513', 'iPad 4', 'Wi-Fi', 'iPad3,4', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD514', 'iPad 4', 'Wi-Fi', 'iPad3,4', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD515', 'iPad 4', 'Wi-Fi', 'iPad3,4', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME393', 'iPad 4', 'Wi-Fi', 'iPad3,4', 'White', '128G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD516', 'iPad 4', 'Wi-Fi + Cellular(GSM)', 'iPad3,5', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD517', 'iPad 4', 'Wi-Fi + Cellular(GSM)', 'iPad3,5', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD518', 'iPad 4', 'Wi-Fi + Cellular(GSM)', 'iPad3,5', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME400', 'iPad 4', 'Wi-Fi + Cellular(GSM)', 'iPad3,5', 'Black', '128G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD519', 'iPad 4', 'Wi-Fi + Cellular(GSM)', 'iPad3,5', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD520', 'iPad 4', 'Wi-Fi + Cellular(GSM)', 'iPad3,5', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD521', 'iPad 4', 'Wi-Fi + Cellular(GSM)', 'iPad3,5', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME401', 'iPad 4', 'Wi-Fi + Cellular(GSM)', 'iPad3,5', 'White', '128G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD522', 'iPad 4', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,6', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME195', 'iPad 4', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,6', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD523', 'iPad 4', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,6', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME196', 'iPad 4', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,6', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD524', 'iPad 4', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,6', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME197', 'iPad 4', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,6', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME406', 'iPad 4', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,6', 'Black', '128G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME410', 'iPad 4', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,6', 'Black', '128G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD525', 'iPad 4', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,6', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME198', 'iPad 4', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,6', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD526', 'iPad 4', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,6', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME199', 'iPad 4', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,6', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD527', 'iPad 4', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,6', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME200', 'iPad 4', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,6', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME407', 'iPad 4', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,6', 'White', '128G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME411', 'iPad 4', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad3,6', 'White', '128G');

-- iPad mini Models
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD528', 'iPad mini', 'Wi-Fi', 'iPad2,5 ', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD529', 'iPad mini', 'Wi-Fi', 'iPad2,5 ', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD530', 'iPad mini', 'Wi-Fi', 'iPad2,5 ', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD531', 'iPad mini', 'Wi-Fi', 'iPad2,5 ', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD532', 'iPad mini', 'Wi-Fi', 'iPad2,5 ', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD533', 'iPad mini', 'Wi-Fi', 'iPad2,5 ', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD534', 'iPad mini', 'Wi-Fi + Cellular(GSM)', 'iPad2,6', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD535', 'iPad mini', 'Wi-Fi + Cellular(GSM)', 'iPad2,6', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD536', 'iPad mini', 'Wi-Fi + Cellular(GSM)', 'iPad2,6', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD537', 'iPad mini', 'Wi-Fi + Cellular(GSM)', 'iPad2,6', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD538', 'iPad mini', 'Wi-Fi + Cellular(GSM)', 'iPad2,6', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD539', 'iPad mini', 'Wi-Fi + Cellular(GSM)', 'iPad2,6', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD540', 'iPad mini', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad2,7', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME215', 'iPad mini', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad2,7', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD541', 'iPad mini', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad2,7', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME216', 'iPad mini', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad2,7', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD542', 'iPad mini', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad2,7', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME217', 'iPad mini', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad2,7', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD543', 'iPad mini', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad2,7', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME218', 'iPad mini', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad2,7', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD544', 'iPad mini', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad2,7', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME219', 'iPad mini', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad2,7', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD545', 'iPad mini', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad2,7', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME220', 'iPad mini', 'Wi-Fi + Cellular(GSM+CDMA)', 'iPad2,7', 'White', '64G');

-- iPod touch models(从三代开始)
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC008', 'iPod touch 3', '', 'iPod3,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC011', 'iPod touch 3', '', 'iPod3,1', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC540', 'iPod touch 4', '', 'iPod4,1', 'Black', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME178', 'iPod touch 4', '', 'iPod4,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC544', 'iPod touch 4', '', 'iPod4,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC547', 'iPod touch 4', '', 'iPod4,1', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD057', 'iPod touch 4', '', 'iPod4,1', 'White', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME179', 'iPod touch 4', '', 'iPod4,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD058', 'iPod touch 4', '', 'iPod4,1', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD059', 'iPod touch 4', '', 'iPod4,1', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD723', 'iPod touch 5', '', 'iPod5,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD724', 'iPod touch 5', '', 'iPod5,1', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD717', 'iPod touch 5', '', 'iPod5,1', 'Blue', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD718', 'iPod touch 5', '', 'iPod5,1', 'Blue', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC903', 'iPod touch 5', '', 'iPod5,1', 'Pink', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC904', 'iPod touch 5', '', 'iPod5,1', 'Pink', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD749', 'iPod touch 5', '', 'iPod5,1', 'Red', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD750', 'iPod touch 5', '', 'iPod5,1', 'Red', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD720', 'iPod touch 5', '', 'iPod5,1', 'Silver', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD721', 'iPod touch 5', '', 'iPod5,1', 'Silver', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD714', 'iPod touch 5', '', 'iPod5,1', 'Yellow', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD715', 'iPod touch 5', '', 'iPod5,1', 'Yellow', '64G');

-- iPhone models
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MA501', 'iPhone 2G', 'GSM ', 'iPhone1,1', 'Black', '4G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MA712', 'iPhone 2G', 'GSM ', 'iPhone1,1', 'Black', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB384', 'iPhone 2G', 'GSM ', 'iPhone1,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB046', 'iPhone 3G', 'GSM ', 'iPhone1,2', 'Black', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB489', 'iPhone 3G', 'GSM ', 'iPhone1,2', 'Black', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB639', 'iPhone 3G', 'GSM ', 'iPhone1,2', 'Black', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB702', 'iPhone 3G', 'GSM ', 'iPhone1,2', 'Black', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC176', 'iPhone 3G', 'GSM ', 'iPhone1,2', 'Black', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB048', 'iPhone 3G', 'GSM ', 'iPhone1,2', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB496', 'iPhone 3G', 'GSM ', 'iPhone1,2', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB704', 'iPhone 3G', 'GSM ', 'iPhone1,2', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB499', 'iPhone 3G', 'GSM ', 'iPhone1,2', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB500', 'iPhone 3G', 'GSM ', 'iPhone1,2', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB501', 'iPhone 3G', 'GSM ', 'iPhone1,2', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB632', 'iPhone 3G', 'GSM ', 'iPhone1,2', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB705', 'iPhone 3G', 'GSM ', 'iPhone1,2', 'White', '16G');

INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB715', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB735', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC135', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB717', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB737', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB716', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB736', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC136', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB718', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MB738', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC555', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'Black', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC640', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'Black', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC131', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC133', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC137', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC132', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC134', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC138', 'iPhone 3GS', 'GSM', 'iPhone2,1', 'White', '32G');

INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD126', 'iPhone 4', 'GSM', 'iPhone3,1', 'Black', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD128', 'iPhone 4', 'GSM', 'iPhone3,1', 'Black', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC318', 'iPhone 4', 'GSM', 'iPhone3,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC603', 'iPhone 4', 'GSM', 'iPhone3,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC608', 'iPhone 4', 'GSM', 'iPhone3,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC319', 'iPhone 4', 'GSM', 'iPhone3,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC605', 'iPhone 4', 'GSM', 'iPhone3,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC610', 'iPhone 4', 'GSM', 'iPhone3,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD196', 'iPhone 4', 'GSM', 'iPhone3,1', 'White', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD198', 'iPhone 4', 'GSM', 'iPhone3,1', 'White', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC604', 'iPhone 4', 'GSM', 'iPhone3,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC606', 'iPhone 4', 'GSM', 'iPhone3,1', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME798', 'iPhone 4', 'GSM Rev A', 'iPhone3,2', 'Black', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME799', 'iPhone 4', 'GSM Rev A', 'iPhone3,2', 'White', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD146', 'iPhone 4', 'CDMA', 'iPhone3,3', 'Black', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD873', 'iPhone 4', 'CDMA', 'iPhone3,3', 'Black', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC676', 'iPhone 4', 'CDMA', 'iPhone3,3', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC678', 'iPhone 4', 'CDMA', 'iPhone3,3', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD200', 'iPhone 4', 'CDMA', 'iPhone3,3', 'White', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD874', 'iPhone 4', 'CDMA', 'iPhone3,3', 'White', '8G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC677', 'iPhone 4', 'CDMA', 'iPhone3,3', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC679', 'iPhone 4', 'CDMA', 'iPhone3,3', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC918', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC922', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD234', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD235', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD276', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD377', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD865', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME804', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC919', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC923', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD241', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD278', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD379', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD257', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD258', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD269', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD280', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD381', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC920', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC924', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD237', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD277', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD378', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD866', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME805', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MC921', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD244', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD279', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD380', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD246', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD260', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD271', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD281', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD382', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'White', '64G');
-- 官方未提供的型号信息
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD239', 'iPhone 4S', 'GSM+CDMA', 'iPhone4,1', 'White', '16G');

INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD293', 'iPhone 5', 'GSM', 'iPhone5,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD634', 'iPhone 5', 'GSM', 'iPhone5,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD638', 'iPhone 5', 'GSM', 'iPhone5,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME486', 'iPhone 5', 'GSM', 'iPhone5,1', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD295', 'iPhone 5', 'GSM', 'iPhone5,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD636', 'iPhone 5', 'GSM', 'iPhone5,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME488', 'iPhone 5', 'GSM', 'iPhone5,1', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD642', 'iPhone 5', 'GSM', 'iPhone5,1', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD644', 'iPhone 5', 'GSM', 'iPhone5,1', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME490', 'iPhone 5', 'GSM', 'iPhone5,1', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD294', 'iPhone 5', 'GSM', 'iPhone5,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD635', 'iPhone 5', 'GSM', 'iPhone5,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME487', 'iPhone 5', 'GSM', 'iPhone5,1', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD296', 'iPhone 5', 'GSM', 'iPhone5,1', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD637', 'iPhone 5', 'GSM', 'iPhone5,1', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME489', 'iPhone 5', 'GSM', 'iPhone5,1', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD643', 'iPhone 5', 'GSM', 'iPhone5,1', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD645', 'iPhone 5', 'GSM', 'iPhone5,1', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME491', 'iPhone 5', 'GSM', 'iPhone5,1', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD297', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD654', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD656', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME039', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'Black', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD299', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD658', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD660', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME041', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'Black', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD662', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD664', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD667', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME043', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'Black', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD298', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD655', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD657', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME040', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD300', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD659', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD661', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME042', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD663', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD665', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MD668', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'White', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME044', 'iPhone 5', 'GSM+CDMA', 'iPhone5,2', 'White', '64G');

-- iPhone 5c
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME507', 'iPhone 5C', 'GSM', 'iPhone5,3', 'Blue', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MF136', 'iPhone 5C', 'GSM', 'iPhone5,3', 'Blue', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME508', 'iPhone 5C', 'GSM', 'iPhone5,3', 'Green', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MF137', 'iPhone 5C', 'GSM', 'iPhone5,3', 'Green', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME509', 'iPhone 5C', 'GSM', 'iPhone5,3', 'Pink', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MF138', 'iPhone 5C', 'GSM', 'iPhone5,3', 'Pink', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME505', 'iPhone 5C', 'GSM', 'iPhone5,3', 'White', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MF134', 'iPhone 5C', 'GSM', 'iPhone5,3', 'White', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME506', 'iPhone 5C', 'GSM', 'iPhone5,3', 'Yellow', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MF135', 'iPhone 5C', 'GSM', 'iPhone5,3', 'Yellow', '32G');

-- iPhone 5S
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME325', 'iPhone 5S', 'GSM', 'iPhone6,1', 'Gold', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME328', 'iPhone 5S', 'GSM', 'iPhone6,1', 'Gold', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME331', 'iPhone 5S', 'GSM', 'iPhone6,1', 'Gold', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME324', 'iPhone 5S', 'GSM', 'iPhone6,1', 'Silver', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME327', 'iPhone 5S', 'GSM', 'iPhone6,1', 'Silver', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME436', 'iPhone 5S', 'GSM', 'iPhone6,1', 'Silver', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME305', 'iPhone 5S', 'GSM', 'iPhone6,1', 'Space Gray', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME323', 'iPhone 5S', 'GSM', 'iPhone6,1', 'Space Gray', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME326', 'iPhone 5S', 'GSM', 'iPhone6,1', 'Space Gray', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME329', 'iPhone 5S', 'GSM', 'iPhone6,1', 'Space Gray', '64G');

INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME434', 'iPhone 5S', 'Global', 'iPhone6,1', 'Gold', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME437', 'iPhone 5S', 'Global', 'iPhone6,1', 'Gold', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME440', 'iPhone 5S', 'Global', 'iPhone6,1', 'Gold', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME433', 'iPhone 5S', 'Global', 'iPhone6,1', 'Silver', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME439', 'iPhone 5S', 'Global', 'iPhone6,1', 'Silver', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME432', 'iPhone 5S', 'Global', 'iPhone6,1', 'Space Gray', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME435', 'iPhone 5S', 'Global', 'iPhone6,1', 'Space Gray', '32G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('ME438', 'iPhone 5S', 'Global', 'iPhone6,1', 'Space Gray', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MF397', 'iPhone 5S', 'Global', 'iPhone6,2', 'Silver', '16G');

-- iPhone 6
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MG492', 'iPhone 6', '', 'iPhone7,2', 'Gold', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MG4J2', 'iPhone 6', '', 'iPhone7,2', 'Gold', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MG4E2', 'iPhone 6', '', 'iPhone7,2', 'Gold', '128G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MG482', 'iPhone 6', '', 'iPhone7,2', 'Silver', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MG4H2', 'iPhone 6', '', 'iPhone7,2', 'Silver', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MG4C2', 'iPhone 6', '', 'iPhone7,2', 'Silver', '128G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MG472', 'iPhone 6', '', 'iPhone7,2', 'Space Gray', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MG4F2', 'iPhone 6', '', 'iPhone7,2', 'Space Gray', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MG4A2', 'iPhone 6', '', 'iPhone7,2', 'Space Gray', '128G');

-- iPhone 6 plus
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MGAA2', 'iPhone 6 plus', '', 'iPhone7,1', 'Gold', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MGAK2', 'iPhone 6 plus', '', 'iPhone7,1', 'Gold', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MGAF2', 'iPhone 6 plus', '', 'iPhone7,1', 'Gold', '128G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MGA92', 'iPhone 6 plus', '', 'iPhone7,1', 'Silver', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MGAJ2', 'iPhone 6 plus', '', 'iPhone7,1', 'Silver', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MGAE2', 'iPhone 6 plus', '', 'iPhone7,1', 'Silver', '128G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MGA82', 'iPhone 6 plus', '', 'iPhone7,1', 'Space Gray', '16G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MGAH2', 'iPhone 6 plus', '', 'iPhone7,1', 'Space Gray', '64G');
INSERT INTO "t_ios_model_dict"(model, generation, variant, identifier, color, storage)
VALUES('MGAC2', 'iPhone 6 plus', '', 'iPhone7,1', 'Space Gray', '128G');

-- ----------------------------
-- Records of "t_violation_cond_dict"
-- ----------------------------
-- 系统类 系统版本过低 
INSERT INTO "t_violation_cond_dict" VALUES ('101', '1', 'violation.cond.dict.sys.os.version.low');
-- 系统类 越狱/Root 
INSERT INTO "t_violation_cond_dict" VALUES ('102', '1', 'violation.cond.dict.sys.jailbreak.root');
-- 系统类 未开启数据加密
INSERT INTO "t_violation_cond_dict" VALUES ('103', '1', 'violation.cond.dict.sys.data.no.cipher');
-- 系统类 SIM变更
INSERT INTO "t_violation_cond_dict" VALUES ('104', '1', 'violation.cond.dict.sys.sim.modify');
-- 系统类 SD卡变更
INSERT INTO "t_violation_cond_dict" VALUES ('105', '1', 'violation.cond.dict.sys.sd.modify');
-- 系统类 策略未更新 
INSERT INTO "t_violation_cond_dict" VALUES ('106', '1', 'violation.cond.dict.sys.strategy.not.update');
--  配置策略类 配置未生效 
INSERT INTO "t_violation_cond_dict" VALUES ('201', '2', 'violation.cond.dict.conf.not.effect');
--  应用类 黑名单
INSERT INTO "t_violation_cond_dict" VALUES ('301', '3', 'violation.cond.dict.app.blacklist');
-- 应用类 白名单
INSERT INTO "t_violation_cond_dict" VALUES ('302', '3', 'violation.cond.dict.app.whitelist');
-- 应用类 必装应用
INSERT INTO "t_violation_cond_dict" VALUES ('303', '3', 'violation.cond.dict.app.force');


-- ----------------------------
-- Records of "t_violation_process_dict"
-- ----------------------------
-- 违规处理字典表 锁定设备 
INSERT INTO "t_violation_process_dict" VALUES ('1', 'violation.process.dict.lock.device');
-- 企业擦除 
INSERT INTO "t_violation_process_dict" VALUES ('2', 'violation.process.dict.company.wipe');
-- 全部擦除
INSERT INTO "t_violation_process_dict" VALUES ('3', 'violation.process.dict.all.wipe');
-- 删除配置  
INSERT INTO "t_violation_process_dict" VALUES ('4', 'violation.process.dict.conf.wipe');
-- 删除企业应用
INSERT INTO "t_violation_process_dict" VALUES ('5', 'violation.process.dict.wipe.app');

-- 禁用企业应用商店
INSERT INTO "t_violation_process_dict" VALUES ('8', 'violation.process.dict.forbid.appstore');

-- 禁用SD卡
INSERT INTO "t_violation_process_dict" VALUES ('10', 'violation.process.dict.forbid.sd');
-- 禁用摄像头 
INSERT INTO "t_violation_process_dict" VALUES ('11', 'violation.process.dict.forbid.camera');

insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('32f6718f08b14132b057e16e30aa4ac8','sys.conf.selfPortal.register.allow','true','允许设备注册','sysconf.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('a373f90358fc47378259eb18fbe7ecc0','sys.conf.selfPortal.eliminate.allow','true','允许设备淘汰','sysconf.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('3d323e85de1745a3b3e040693b305e43','sys.conf.base.allowRoot','0','允许越狱/ROOT设备。0不允许，1允许','sysconf.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('3d323e85de2345a3b3e040693b305ety','sys.conf.base.relationship.default','1','默认设备归属。1企业，2员工，3其它','sysconf.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('53b350aeb54c48faa055e95bf7d3f55c','sys.conf.base.unregist.activate.allow','0','允许未注册设备激活。0不允许，1允许','sysconf.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('279e5e3f05ac4cb9b6b84a74e387be15','sys.conf.base.info.notSame','0','设备激活与设备注册时的信息不一致时允许激活。0不允许，1允许','sysconf.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('86c5e1b9bbd141cd99ce35d4e01b9147','sys.conf.base.maxRegNum','10','单用户最大激活设备数量','sysconf.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('0af7139c8330453c93f98434cabc4e04','sys.conf.base.regist.mail.subject','${tenantindentifier}设备注册通知','注册通知邮件标题','sysconf.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('4070ed10b7524c3d98b2f2fe62f36b1c','sys.conf.base.regist.mail.content','{userName},您好：\n  您已完成了“{deviceName}”设备的注册，现在您可以进行设备激活。\n设备激活时，请按提示输入您的用户名和密码：\n用户：{userID}\n密码：\n本邮件由${tenantindentifier} MDM自动发送，无需回复。\n如有问题，请与管理员联系。','注册邮件内容','sysconf.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('cbf335ca1f5c4e5784b2e8b3a88f42ba','sys.conf.base.regist.sms.content','${tenantindentifier}设备注册通知短信','注册通知短信息内容','sysconf.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('74fd19ae61d84e5eb54825b65d370bd0','sys.conf.base.regist.mail.subject.en','','注册通知邮件标题-en','sysconf.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('d0913910f5614a9ea7ff6d258b05737a','sys.conf.base.regist.mail.content.en','','注册邮件内容-en','sysconf.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('10dd447433b24f4da657d61654f87cba','sys.conf.base.regist.sms.content.en','','注册通知短信息内容-en','sysconf.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('78e8b72ca00e423f9294121f788d9577','sys.conf.base.regist.mail.subject.ja_JP','${tenantindentifier}デバイス登録通知','注册通知邮件标题-ja','sysconf.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('cc48f72524504ce1953cc5fdb43b7e46','sys.conf.base.regist.mail.content.ja_JP','{userName},こんにちは：\nお使いの“{deviceName}”登録が完了しました。\nお使いのデバイスはアクティベーションが可能です。\nデバイスがアクティベーションされたら、ユーザID、パスワードを入力してください。\nユーザ：{userID}\nパスワード：\n本メッセージは${tenantindentifier} MDMから自動送信されています。\nご質問については、管理者にお問い合わせください。','注册邮件内容-ja','sysconf.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('e050dedbf66b4abaa98a5139c67651df','sys.conf.base.regist.sms.content.ja_JP','${tenantindentifier}デバイス登録通知SMS','注册通知短信息内容-ja','sysconf.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('5ab0dc40d4f8437883c4b9cfc4f81d42','sys.conf.session.timeout','30','banckend管理平台超时时间','sysconf.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('3bf4267de9ed404d949ea3403bfd6263','mail.smtp.host','smtp.netqin.com','SMTP服务器','email.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('65ff0b6064d14e44a719e66d81b34bf4','mail.smtp.port','25','SMTP服务器端口','email.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('a3bb6cb935c346a9adfcbb2d90248b58','mail.smtp.username','scansupport@nq.com','邮箱用户名','email.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('5b8232fe174841799d97361e5f5b6d70','mail.smtp.password','xsii~129','邮箱密码','email.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('9d8c7fcdb4414441ac4a32ef449ef968','mail.smtp.displayName','scansupport','邮件显示发送者名字','email.properties');
insert into "t_sys_config" (`id`, `prop_key`, `prop_value`, `note`, `config_file_name`) values('d691f597ee46492eb187ea30a4152c24','mail.usessl','false','启用SSL。true启用，false不启用','email.properties');
-- insert end
-- alter start
ALTER TABLE "T_VIRUSSCAN_LATEST" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_VIRUSSCAN_HISTORY" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_VIOLATION_DEVICE_PROC" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_VIOLATION_DEVICE_APP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_VIOLATION_DEVICE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_VIOLATION_COND_DICT" ADD CONSTRAINT  PRIMARY KEY("CONDID") ;

ALTER TABLE "T_VIOLATION_ADMIN_ALARM" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_VIOLATIONS_USER" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_VIOLATIONS_GROUP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_VIOLATIONS_DEVICE_COPY" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_VIOLATIONS_DEVICE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_VIOLATIONS" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_VIOLATE_PROCESS_DICT" ADD CONSTRAINT  PRIMARY KEY("PROCESSID") ;

ALTER TABLE "T_VIOLATE_DIST_DEVICE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_VERSION" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_USER_SIGNIN_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_USER_PIN" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_USER_FAMILY_PHONE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_USER_FAMILY_PHONE" ADD CONSTRAINT "UINDEX_USERID_PHONE" UNIQUE("USERID","PHONE") ;

ALTER TABLE "T_USER_CUSTOM_FIELD" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_USER_CENTER" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_USER_BACK_THREAD_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_USER_APP_PERMISSION" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_USER" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_TIME_UNIT" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_TIME_FENCE_RECORD" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_TIME_FENCE_RECORD" ADD CONSTRAINT "UDID" UNIQUE("UDID","POLICYID") ;

ALTER TABLE "T_TEMP_DEVICE_IOS_CTRL" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_TAG_USER" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_TAG_TIME" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_TAG_POSITION" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_TAG_GROUP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_TAG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_SYS_USER_ROLE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_SYS_USER_PERM" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_SYS_USER_GROUP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_SYS_USER_API" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_SYS_USER" ADD CONSTRAINT  PRIMARY KEY("LOGINID") ;

ALTER TABLE "T_SYS_ROLE_MENU" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_SYS_ROLE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_SYS_MENU" ADD CONSTRAINT  PRIMARY KEY("CODE") ;

ALTER TABLE "T_SYS_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_SYS_DICTIONARY_VALUE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_SYS_DICTIONARY" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_SYS_CONFIG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_SYSCONF_SETLICENSE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_STATIC_LABEL_USER" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_STATIC_LABEL_USER" ADD CONSTRAINT "INDEX_UNIQUE_LABELID_DEVICEID" UNIQUE("LABELID","USERID") ;

ALTER TABLE "T_SERVER" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_SERVER" ADD CONSTRAINT "SERVER_TYPE_NAME_VERSION" UNIQUE("TYPE","NAME") ;

ALTER TABLE "T_RESTRICTIONS_SAMSUNG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_RESET_PASSWORD" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_REPORT_SUBS_PARAM" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_REPORT_SUBSCRIPTION" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_REPORT_SCHEDULE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_REPORT_CHATS_FILE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_REPORT_CHATS_CONTENT" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_REPORT" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_REMOTE_DESKTOP_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_PUSH_INFO" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_POLICY_USER" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_POLICY_SCEP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_POLICY_PUSH" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_POLICY_MDM" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_POLICY_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_POLICY_GROUP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_POLICY" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_PERM_TEMPLATE_MENU" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_PERM_TEMPLATE_API" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_PERM_TEMPLATE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_NOTIFICATIONS_LOGON" ADD CONSTRAINT  PRIMARY KEY("NOTIFICATION_ID") ;

ALTER TABLE "T_NOTIFICATION" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_MEM_TASK" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_MALWARE_LIST" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_LOG_PFYH" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_LDAP_CONFIG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_LAST_LOCATION" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_LABEL" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_IOS_MODEL_DICT" ADD CONSTRAINT  PRIMARY KEY("MODEL") ;

ALTER TABLE "T_IOS_BUILDIN_APP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_IND_STRATEGY_MAX_SET" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_INDEX_STRATEGY_SET" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_INDEX_SHORTCUT_SET" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_INDEX_SHORTCUT_DEF" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_INDEX_CHART_SET" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_INDEX_CHART_DEF" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_INDEX_APP_SET" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_INDEX_APP_MAX_SET" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_IMPORT_SERVER" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_ILLEGAL_TIME" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_ILLEGAL_SMSSEND_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_GROUP_MAP" ADD CONSTRAINT  PRIMARY KEY("GROUPID") ;

ALTER TABLE "T_GROUP_CENTER" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_GROUP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_GOOGLE_USER_PRODUCT" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_GOOGLE_PLAY_PRODUCT" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_GOOGLE_LAYOUT_PAGE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_FOLDER_DIST_USER" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_FOLDER_DIST_GROUP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_FOLDER_DISTRIBUTE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_FOLDER" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_FILE_USER_STAR" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_FILE_USER_OPEN" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_FILE_DIST_USER" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_FILE_DIST_GROUP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_FILE_DISTRIBUTE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_FILE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_FENCE_TRIGGER_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_FENCE_INOUT_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_FENCE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_EXCEPTION" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_ENTRANCE_GUARD_PUSH" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_ENTRANCE_GUARD_PUG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_ENTRANCE_GUARD_PU" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_ENTRANCE_GUARD_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_ENTRANCE_GUARD_GROUP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_ENTRANCE_GUARD_GROUP" ADD CONSTRAINT "UINDEX_GUARDGROUPNAME" UNIQUE("GUARDGROUPNAME") ;

ALTER TABLE "T_ENTRANCE_GUARD_DEVICE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_ENTRANCE_GUARD" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_ENTRANCE_GUARD" ADD CONSTRAINT "UINDEX_NAME_DATA" UNIQUE("GUARDNAME","GUARDDATA") ;

ALTER TABLE "T_EMM_TOKEN" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_EMM_PINCODE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_EMM_PINCODE" ADD CONSTRAINT "PROXY_RECORD_ID" UNIQUE("PROXY_RECORD_ID") ;

ALTER TABLE "T_EMM_GRANT" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_EMM_GRANT" ADD CONSTRAINT "HOST_ID" UNIQUE("HOST_ID") ;

ALTER TABLE "T_EMM_CLIENT_LOGIN" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DYNAMIC_LABEL_USER" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DOC_GROUP_VERSION" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DOC_GROUP_VERSION" ADD CONSTRAINT "INDEX_UNIQUE_GROUPID" UNIQUE("GROUPID") ;

ALTER TABLE "T_DOCUMENT_USER_VERSION" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DOCUMENT_USER_VERSION" ADD CONSTRAINT "INDEX_UNIQUE_USERID" UNIQUE("USERID") ;

ALTER TABLE "T_DOCUMENT_TAG_USER" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DOCUMENT_TAG_USER" ADD CONSTRAINT "TAGID" UNIQUE("TAGID","USERID") ;

ALTER TABLE "T_DOCUMENT_TAG_LINK" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DOCUMENT_TAG_LINK" ADD CONSTRAINT "DOCID" UNIQUE("DOCID","TAGID") ;

ALTER TABLE "T_DOCUMENT_TAG_GROUP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DOCUMENT_TAG_GROUP" ADD CONSTRAINT "CONS134221725" UNIQUE("TAGID","GROUPID") ;

ALTER TABLE "T_DOCUMENT_TAG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DOCUMENT_STATISTICS" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DOCUMENT_OPER_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DOCUMENT_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DOCUMENT" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_WRAPAPP" ADD CONSTRAINT  PRIMARY KEY("DEVICEID") ;

ALTER TABLE "T_DEVICE_WECHAT_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_WECHAT_LINKMAN" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_WECHAT" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_USING_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_USERCHECKIN" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_TRAFFIC" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_TMP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_SYSEVENT_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_STATUS" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_SECURITYINFO" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_SAMSUNG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_REMOTECONTROL" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_PWD" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_PROFILE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_POSITION" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_OPER_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_NETWORK_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_MSG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_MODEL" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_MODEL" ADD CONSTRAINT "MODEL" UNIQUE("MODEL") ;

ALTER TABLE "T_DEVICE_HISTORY" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_FILE_STATUS" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_EXCEPTION" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_DIAGNOSE_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_CRYPTOMODULE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_COLLECT" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_CMD_SEND_STATE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_CHECK_DEVICE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_CHECK" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_CERT" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_CALLOVER_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_CALL" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_BROWSERHISTORY" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_APP_ACTION" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_APPUSAGE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_APP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_APP" ADD CONSTRAINT "INDEX_UNION_UNIQUE" UNIQUE("PACKAGENAME","DEVICEID") ;

ALTER TABLE "T_DEVICE_APN_TOKEN" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_APN" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE_ACCESSWEB" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_DEVICE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_CONTACT_VERSION" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_CONTACT_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_CONTACT_DATA" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_CONTACT" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_CONNECTOR" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_CONFIG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_CONFIG" ADD CONSTRAINT "K" UNIQUE("K") ;

ALTER TABLE "T_COMPLIANCE_SCHEDULE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_COMMAND_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_COMMAND_LOG" ADD CONSTRAINT "LOGTIME" UNIQUE("LOGTIME") ;

ALTER TABLE "T_CLIENT_POLICY" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_CLIENT_POLICY" ADD CONSTRAINT "CLIENT_POLICY__CLIENTID" UNIQUE("CLIENTID") ;

ALTER TABLE "T_CLIENT" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_CLIENT" ADD CONSTRAINT "CLIENT_HOSTID_APPID_TENANTID" UNIQUE("HOSTID","APPID","TENANTID") ;

ALTER TABLE "T_APP_TRAFFIC" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_TIME_GROUP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_STRATEGY_USER" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_STRATEGY_STORE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_STRATEGY_PUSH" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_STRATEGY_LABEL" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_STRATEGY_IRRE_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_STRATEGY_GROUP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_STRATEGY_DEVICE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_STRATEGY" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_STORE_USER_GROUP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_STORE_USER" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_STORE_PATCH" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_STORE_DEVICE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_STORE_CONF" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_STORE_CATEGORY" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_STORE_CATEGORY" ADD CONSTRAINT "APPSTOREID" UNIQUE("APPSTOREID","APPCATEGORYID") ;

ALTER TABLE "T_APP_STORE_APPINFO" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_STORE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_SCHEDULE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_PUSH_USER_GROUP" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_PUSH_USER" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_PUSH" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_OPERATION" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_DOWNLOAD_LOG" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APP_CATEGORY" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APPLE_DEVICE_PROFILE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APPLE_DEVICE_PROFILE" ADD CONSTRAINT "INDEX_UNIQUE_SERIAL_NUMBER" UNIQUE("SERIALNUMBER") ;

ALTER TABLE "T_APPLE_DEP_PROFILE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_APPLE_DEP_DEVICE" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_API_TOKEN" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_API_DICT" ADD CONSTRAINT  PRIMARY KEY("CODE") ;

ALTER TABLE "T_ADMIN_LIST_DEFAULT" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_ADMIN_LIST_CUSTOM" ADD CONSTRAINT  PRIMARY KEY("ID") ;

ALTER TABLE "T_ACCESSWEB_RESTRICTION" ADD CONSTRAINT  PRIMARY KEY("ID") ;


ALTER TABLE "T_VIOLATION_DEVICE_PROC" ADD CONSTRAINT "T_VIOLATION_DEVICE_PROC_IBFK_1" FOREIGN KEY("VIOLATIONID") REFERENCES "T_VIOLATIONS"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_VIOLATION_DEVICE_PROC" ADD CONSTRAINT "T_VIOLATION_DEVICE_PROC_IBFK_2" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_VIOLATION_DEVICE" ADD CONSTRAINT "T_VIOLATION_DEVICE_IBFK_22" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_VIOLATIONS_USER" ADD CONSTRAINT "T_VIOLATIONS_USER_IBFK_2" FOREIGN KEY("USERID") REFERENCES "T_USER"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_VIOLATIONS_USER" ADD CONSTRAINT "T_VIOLATIONS_USER_IBFK_1" FOREIGN KEY("VIOLATIONID") REFERENCES "T_VIOLATIONS"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_VIOLATIONS_GROUP" ADD CONSTRAINT "T_VIOLATIONS_GROUP_IBFK_2" FOREIGN KEY("GROUPID") REFERENCES "T_GROUP"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_VIOLATIONS_GROUP" ADD CONSTRAINT "T_VIOLATIONS_GROUP_IBFK_1" FOREIGN KEY("VIOLATIONID") REFERENCES "T_VIOLATIONS"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_VIOLATIONS_DEVICE_COPY" ADD CONSTRAINT "T_VIOLATIONS_DEVICE_COPY_IBFK_1" FOREIGN KEY("VIOLATIONID") REFERENCES "T_VIOLATIONS"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_TIME_UNIT" ADD CONSTRAINT "T_TIME_UNIT_IBFK_1" FOREIGN KEY("FENCEID") REFERENCES "T_FENCE"("ID") ;

ALTER TABLE "T_TAG_USER" ADD CONSTRAINT "T_TAG_USER_IBFK_1" FOREIGN KEY("TAGID") REFERENCES "T_TAG"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_TAG_USER" ADD CONSTRAINT "T_TAG_USER_IBFK_2" FOREIGN KEY("USERID") REFERENCES "T_USER"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_TAG_TIME" ADD CONSTRAINT "T_TAG_TIME_IBFK_1" FOREIGN KEY("TAGID") REFERENCES "T_TAG"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_TAG_POSITION" ADD CONSTRAINT "T_TAG_POSITION_IBFK_1" FOREIGN KEY("TAGID") REFERENCES "T_TAG"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_TAG_GROUP" ADD CONSTRAINT "T_TAG_GROUP_IBFK_2" FOREIGN KEY("GROUPID") REFERENCES "T_GROUP"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_TAG_GROUP" ADD CONSTRAINT "T_TAG_GROUP_IBFK_1" FOREIGN KEY("TAGID") REFERENCES "T_TAG"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_SYS_USER_ROLE" ADD CONSTRAINT "T_SYS_USER_ROLE_IBFK_2" FOREIGN KEY("ROLEID") REFERENCES "T_SYS_ROLE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_SYS_USER_ROLE" ADD CONSTRAINT "T_SYS_USER_ROLE_IBFK_3" FOREIGN KEY("LOGINID") REFERENCES "T_SYS_USER"("LOGINID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_SYS_USER_PERM" ADD CONSTRAINT "T_SYS_USER_PERM_IBFK_2" FOREIGN KEY("CODE") REFERENCES "T_SYS_MENU"("CODE") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_SYS_USER_PERM" ADD CONSTRAINT "T_SYS_USER_PERM_IBFK_1" FOREIGN KEY("LOGINID") REFERENCES "T_SYS_USER"("LOGINID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_SYS_USER_GROUP" ADD CONSTRAINT "SYS_USER_GROUP_IBFK_1" FOREIGN KEY("LOGINID") REFERENCES "T_SYS_USER"("LOGINID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_SYS_USER_GROUP" ADD CONSTRAINT "SYS_USER_GROUP_IBFK_2" FOREIGN KEY("GROUPID") REFERENCES "T_GROUP"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_SYS_USER_API" ADD CONSTRAINT "T_SYS_USER_API_FK" FOREIGN KEY("LOGINID") REFERENCES "T_SYS_USER"("LOGINID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_SYS_ROLE_MENU" ADD CONSTRAINT "T_SYS_ROLE_MENU_IBFK_1" FOREIGN KEY("ROLEID") REFERENCES "T_SYS_ROLE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_SYS_ROLE_MENU" ADD CONSTRAINT "T_SYS_ROLE_MENU_IBFK_2" FOREIGN KEY("CODE") REFERENCES "T_SYS_MENU"("CODE") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_SYS_DICTIONARY_VALUE" ADD CONSTRAINT "T_SYS_DICTIONARY_VALUE_IBFK_1" FOREIGN KEY("DICTTYPE") REFERENCES "T_SYS_DICTIONARY"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_STATIC_LABEL_USER" ADD CONSTRAINT "T_STATIC_LABEL_USER_IBFK_1" FOREIGN KEY("LABELID") REFERENCES "T_LABEL"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_STATIC_LABEL_USER" ADD CONSTRAINT "T_STATIC_LABEL_USER_IBFK_2" FOREIGN KEY("USERID") REFERENCES "T_USER"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_RESTRICTIONS_SAMSUNG" ADD CONSTRAINT "T_RESTRICTIONS_SAMSUNG_IBFK_1" FOREIGN KEY("UUID") REFERENCES "T_POLICY"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_REPORT_SUBS_PARAM" ADD CONSTRAINT "T_REPORT_SUBS_PARAM_IBFK_1" FOREIGN KEY("SUBSID") REFERENCES "T_REPORT_SUBSCRIPTION"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_REPORT_SUBSCRIPTION" ADD CONSTRAINT "T_REPORT_SUBSCRIPTION_IBFK_1" FOREIGN KEY("REPORTID") REFERENCES "T_REPORT"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_REPORT_SCHEDULE" ADD CONSTRAINT "T_REPORT_SCHEDULE_IBFK_1" FOREIGN KEY("SUBSID") REFERENCES "T_REPORT_SUBSCRIPTION"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_REMOTE_DESKTOP_LOG" ADD CONSTRAINT "T_REMOTE_DESKTOP_LOG_IBFK_1" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_POLICY_USER" ADD CONSTRAINT "T_POLICY_USER_IBFK_2" FOREIGN KEY("USERID") REFERENCES "T_USER"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_POLICY_USER" ADD CONSTRAINT "T_POLICY_USER_IBFK_1" FOREIGN KEY("POLICYID") REFERENCES "T_POLICY"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_POLICY_SCEP" ADD CONSTRAINT "T_POLICY_SCEP_IBFK_1" FOREIGN KEY("UUID") REFERENCES "T_POLICY"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_POLICY_MDM" ADD CONSTRAINT "T_POLICY_MDM_IBFK_1" FOREIGN KEY("UUID") REFERENCES "T_POLICY"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_POLICY_GROUP" ADD CONSTRAINT "T_POLICY_GROUP_IBFK_1" FOREIGN KEY("POLICYID") REFERENCES "T_POLICY"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_POLICY_GROUP" ADD CONSTRAINT "T_POLICY_GROUP_IBFK_2" FOREIGN KEY("GROUPID") REFERENCES "T_GROUP"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_POLICY" ADD CONSTRAINT "FK_T_POLICY_FENCEID_T_FENCE" FOREIGN KEY("FENCEID") REFERENCES "T_FENCE"("ID") ;

ALTER TABLE "T_PERM_TEMPLATE_MENU" ADD CONSTRAINT "T_PERM_TEMPLATE_MENU_IBFK_2" FOREIGN KEY("CODE") REFERENCES "T_SYS_MENU"("CODE") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_PERM_TEMPLATE_API" ADD CONSTRAINT "T_PERM_TEMPLATE_API_FK" FOREIGN KEY("TEMPLATEID") REFERENCES "T_PERM_TEMPLATE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_PERM_TEMPLATE" ADD CONSTRAINT "T_PERM_TEMPLATE_IBFK_1" FOREIGN KEY("LOGINID") REFERENCES "T_SYS_USER"("LOGINID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_LAST_LOCATION" ADD CONSTRAINT "T_LAST_LOCATION_IBFK_1" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_FOLDER_DIST_USER" ADD CONSTRAINT "T_FOLDER_DISTRIBUTE_USER_IBFK_2" FOREIGN KEY("USERID") REFERENCES "T_USER"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_FOLDER_DIST_USER" ADD CONSTRAINT "T_FOLDER_DISTRIBUTE_USER_IBFK_1" FOREIGN KEY("FOLDERDISTRIBUTEID") REFERENCES "T_FOLDER_DISTRIBUTE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_FOLDER_DIST_GROUP" ADD CONSTRAINT "T_FOLDER_DISTRIBUTE_GROUP_IBFK_1" FOREIGN KEY("FOLDERDISTRIBUTEID") REFERENCES "T_FOLDER_DISTRIBUTE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_FOLDER_DIST_GROUP" ADD CONSTRAINT "T_FOLDER_DISTRIBUTE_GROUP_IBFK_2" FOREIGN KEY("GROUPID") REFERENCES "T_GROUP"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_FILE_USER_STAR" ADD CONSTRAINT "T_FILE_USER_STAR_IBFK_2" FOREIGN KEY("USERID") REFERENCES "T_USER"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_FILE_USER_STAR" ADD CONSTRAINT "T_FILE_USER_STAR_IBFK_1" FOREIGN KEY("FILEID") REFERENCES "T_FILE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_FILE_USER_OPEN" ADD CONSTRAINT "T_FILE_USER_OPEN_IBFK_2" FOREIGN KEY("USERID") REFERENCES "T_USER"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_FILE_USER_OPEN" ADD CONSTRAINT "T_FILE_USER_OPEN_IBFK_1" FOREIGN KEY("FILEID") REFERENCES "T_FILE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_FILE_DIST_USER" ADD CONSTRAINT "T_FILE_DISTRIBUTE_USER_IBFK_2" FOREIGN KEY("USERID") REFERENCES "T_USER"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_FILE_DIST_USER" ADD CONSTRAINT "T_FILE_DISTRIBUTE_USER_IBFK_1" FOREIGN KEY("FILEDISTRIBUTEID") REFERENCES "T_FILE_DISTRIBUTE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_FILE_DIST_GROUP" ADD CONSTRAINT "T_FILE_DISTRIBUTE_GROUP_IBFK_1" FOREIGN KEY("FILEDISTRIBUTEID") REFERENCES "T_FILE_DISTRIBUTE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_FILE_DIST_GROUP" ADD CONSTRAINT "T_FILE_DISTRIBUTE_GROUP_IBFK_2" FOREIGN KEY("GROUPID") REFERENCES "T_GROUP"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_FILE_DISTRIBUTE" ADD CONSTRAINT "T_FILE_DISTRIBUTE_IBFK_2" FOREIGN KEY("LABELID") REFERENCES "T_LABEL"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_FILE_DISTRIBUTE" ADD CONSTRAINT "T_FILE_DISTRIBUTE_IBFK_1" FOREIGN KEY("FILEID") REFERENCES "T_FILE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_ENTRANCE_GUARD_PUG" ADD CONSTRAINT "TEGPUG_IBFK_1" FOREIGN KEY("GUARDID") REFERENCES "T_ENTRANCE_GUARD"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_ENTRANCE_GUARD_PUG" ADD CONSTRAINT "TEGPUG_IBFK_2" FOREIGN KEY("GROUPID") REFERENCES "T_GROUP"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_ENTRANCE_GUARD_PU" ADD CONSTRAINT "TEGPU_IBFK_1" FOREIGN KEY("GUARDID") REFERENCES "T_ENTRANCE_GUARD"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_ENTRANCE_GUARD_PU" ADD CONSTRAINT "TEGPU_IBFK_2" FOREIGN KEY("USERID") REFERENCES "T_USER"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_ENTRANCE_GUARD_DEVICE" ADD CONSTRAINT "TEGD_IBFK_2" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_ENTRANCE_GUARD_DEVICE" ADD CONSTRAINT "TEGD_IBFK_1" FOREIGN KEY("GUARDID") REFERENCES "T_ENTRANCE_GUARD"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DYNAMIC_LABEL_USER" ADD CONSTRAINT "T_DYNAMIC_LABEL_USER_IDFK" FOREIGN KEY("LABELID") REFERENCES "T_LABEL"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DOCUMENT_TAG_USER" ADD CONSTRAINT "T_DOCUMENT_TAG_USER_IBFK_2" FOREIGN KEY("USERID") REFERENCES "T_USER"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DOCUMENT_TAG_USER" ADD CONSTRAINT "T_DOCUMENT_TAG_USER_IBFK_1" FOREIGN KEY("TAGID") REFERENCES "T_DOCUMENT_TAG"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DOCUMENT_TAG_LINK" ADD CONSTRAINT "T_DOCUMENT_TAG_LINK_IBFK_2" FOREIGN KEY("TAGID") REFERENCES "T_DOCUMENT_TAG"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DOCUMENT_TAG_LINK" ADD CONSTRAINT "T_DOCUMENT_TAG_LINK_IBFK_1" FOREIGN KEY("DOCID") REFERENCES "T_DOCUMENT"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DOCUMENT_TAG_GROUP" ADD CONSTRAINT "T_DOCUMENT_TAG_GROUP_IBFK_2" FOREIGN KEY("GROUPID") REFERENCES "T_GROUP"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DOCUMENT_TAG_GROUP" ADD CONSTRAINT "T_DOCUMENT_TAG_GROUP_IBFK_1" FOREIGN KEY("TAGID") REFERENCES "T_DOCUMENT_TAG"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DOCUMENT_LOG" ADD CONSTRAINT "T_DOCUMENT_LOG_IBFK_2" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DOCUMENT_LOG" ADD CONSTRAINT "T_DOCUMENT_LOG_IBFK_1" FOREIGN KEY("DOCID") REFERENCES "T_DOCUMENT"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DOCUMENT" ADD CONSTRAINT "T_DOCUMENT_IBFK_1" FOREIGN KEY("TAGID") REFERENCES "T_DOCUMENT_TAG"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DEVICE_WRAPAPP" ADD CONSTRAINT "T_DEVICE_WRAPAP_IBFK_1" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DEVICE_USING_LOG" ADD CONSTRAINT "T_DEVICE_USING_LOG_IBFK_1" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DEVICE_STATUS" ADD CONSTRAINT "T_DEVICE_STATUS_IBFK_1" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DEVICE_SECURITYINFO" ADD CONSTRAINT "T_DEVICE_SECURITYINFO_IBFK_1" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DEVICE_SAMSUNG" ADD CONSTRAINT "T_DEVICE_SAMSUNG_IBFK_1" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DEVICE_REMOTECONTROL" ADD CONSTRAINT "T_DEVICE_REMOTECONTROL_IBFK_1" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DEVICE_PROFILE" ADD CONSTRAINT "T_DEVICE_PROFILE_IBFK_1" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DEVICE_EXCEPTION" ADD CONSTRAINT "T_DEVICE_EXCEPTION_IBFK_2" FOREIGN KEY("USERID") REFERENCES "T_USER"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DEVICE_EXCEPTION" ADD CONSTRAINT "T_DEVICE_EXCEPTION_IBFK_1" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DEVICE_DIAGNOSE_LOG" ADD CONSTRAINT "T_DEVICE_DIAGNOSE_LOG_IBFK_1" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DEVICE_CRYPTOMODULE" ADD CONSTRAINT "FK_T_DEVICE_CRYPTOMODULE_DEVICEID" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DEVICE_CHECK_DEVICE" ADD CONSTRAINT "FK_DEVICE_CHECK_DEVICE_CHECKID" FOREIGN KEY("CHECKID") REFERENCES "T_DEVICE_CHECK"("ID") ;

ALTER TABLE "T_DEVICE_CHECK_DEVICE" ADD CONSTRAINT "FK_DEVICE_CHECK_DEVICE_DEVICEID" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ;

ALTER TABLE "T_DEVICE_CERT" ADD CONSTRAINT "FK_T_DEVICE_CERT_DEVICEID" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DEVICE_APN_TOKEN" ADD CONSTRAINT "FK_T_DEVICE_APN_TOKEN_DEVICEID" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DEVICE_APN" ADD CONSTRAINT "FK_T_DEVICE_APN_DEVICEID" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DEVICE" ADD CONSTRAINT "T_DEVICE_IBFK_1" FOREIGN KEY("USERID") REFERENCES "T_USER"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_DEVICE" ADD CONSTRAINT "T_DEVICE_IBFK_2" FOREIGN KEY("SUBGROUPID") REFERENCES "T_GROUP"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_CONTACT_DATA" ADD CONSTRAINT "T_CONTACT_DATA_IBFK_1" FOREIGN KEY("CONTACTID") REFERENCES "T_CONTACT"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_CLIENT_POLICY" ADD CONSTRAINT "CLIENT_POLICY__CLIENT__CLIENTID" FOREIGN KEY("CLIENTID") REFERENCES "T_CLIENT"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_TIME_GROUP" ADD CONSTRAINT "T_APP_TIME_GROUP_IBFK_1" FOREIGN KEY("APPID") REFERENCES "T_APP_STORE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_TIME_GROUP" ADD CONSTRAINT "T_APP_TIME_GROUP_IBFK_2" FOREIGN KEY("GROUPID") REFERENCES "T_GROUP"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_STRATEGY_STORE" ADD CONSTRAINT "T_APP_STRATEGY_STORE_IBFK_1" FOREIGN KEY("STRATEGYID") REFERENCES "T_APP_STRATEGY"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_STRATEGY_LABEL" ADD CONSTRAINT "T_APP_STRATEGY_LABEL_IBFK_2" FOREIGN KEY("LABELID") REFERENCES "T_LABEL"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_STRATEGY_LABEL" ADD CONSTRAINT "T_APP_STRATEGY_LABEL_IBFK_1" FOREIGN KEY("STRATEGYID") REFERENCES "T_APP_STRATEGY"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_STRATEGY_IRRE_LOG" ADD CONSTRAINT "T_APP_STRATEGY_IRRE_LOG_IBFK_2" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_STRATEGY_IRRE_LOG" ADD CONSTRAINT "T_APP_STRATEGY_IRRE_LOG_IBFK_1" FOREIGN KEY("USERID") REFERENCES "T_USER"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_STRATEGY_DEVICE" ADD CONSTRAINT "T_APP_STRATEGY_DEVICE_IBFK_2" FOREIGN KEY("STRATEGYID") REFERENCES "T_APP_STRATEGY"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_STRATEGY_DEVICE" ADD CONSTRAINT "T_APP_STRATEGY_DEVICE_IBFK_1" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_STORE_USER_GROUP" ADD CONSTRAINT "T_APP_STORE_USER_GROUP_IBFK_1" FOREIGN KEY("APPSTOREID") REFERENCES "T_APP_STORE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_STORE_USER_GROUP" ADD CONSTRAINT "T_APP_STORE_USER_GROUP_IBFK_2" FOREIGN KEY("GROUPID") REFERENCES "T_GROUP"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_STORE_USER" ADD CONSTRAINT "T_APP_STORE_USER_IBFK_1" FOREIGN KEY("APPSTOREID") REFERENCES "T_APP_STORE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_STORE_USER" ADD CONSTRAINT "T_APP_STORE_USER_IBFK_2" FOREIGN KEY("USERID") REFERENCES "T_USER"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_STORE_DEVICE" ADD CONSTRAINT "T_APP_STORE_DEVICE_IBFK_2" FOREIGN KEY("DEVICEID") REFERENCES "T_DEVICE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_STORE_DEVICE" ADD CONSTRAINT "T_APP_STORE_DEVICE_IBFK_1" FOREIGN KEY("APPSTOREID") REFERENCES "T_APP_STORE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_STORE_CATEGORY" ADD CONSTRAINT "T_APP_STORE_CATEGORY_IBFK_1" FOREIGN KEY("APPCATEGORYID") REFERENCES "T_APP_CATEGORY"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_STORE_CATEGORY" ADD CONSTRAINT "T_APP_STORE_CATEGORY_IBFK_2" FOREIGN KEY("APPSTOREID") REFERENCES "T_APP_STORE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_APP_SCHEDULE" ADD CONSTRAINT "T_APP_SCHEDULE_IBFK_1" FOREIGN KEY("APPID") REFERENCES "T_APP_STORE"("ID") ON UPDATE CASCADE  ON DELETE CASCADE  ;

ALTER TABLE "T_ADMIN_LIST_CUSTOM" ADD CONSTRAINT "T_ADMIN_LIST_CUSTOM_IBFK_1" FOREIGN KEY("LOGINID") REFERENCES "T_SYS_USER"("LOGINID") ON UPDATE CASCADE  ON DELETE CASCADE  ;
-- alter end
commit;